@@ -66,11 +66,15 @@ func (d *DirectPathMount) Open(ctx context.Context) (retDeviceIndex uint32, err
6666 zap .L ().Debug ("opening direct path mount" , zap .Uint32 ("device_index" , d .deviceIndex ), zap .Error (err ))
6767 }()
6868
69+ telemetry .ReportEvent (ctx , "opening direct path mount" )
70+
6971 size , err := d .Backend .Size ()
7072 if err != nil {
7173 return math .MaxUint32 , err
7274 }
7375
76+ telemetry .ReportEvent (ctx , "got backend size" )
77+
7478 deviceIndex := uint32 (math .MaxUint32 )
7579
7680 for {
@@ -79,6 +83,8 @@ func (d *DirectPathMount) Open(ctx context.Context) (retDeviceIndex uint32, err
7983 return math .MaxUint32 , err
8084 }
8185
86+ telemetry .ReportEvent (ctx , "got device index" )
87+
8288 d .socksClient = make ([]* os.File , 0 )
8389 d .socksServer = make ([]io.Closer , 0 )
8490 d .dispatchers = make ([]* Dispatch , 0 )
@@ -169,6 +175,8 @@ func (d *DirectPathMount) Open(ctx context.Context) (retDeviceIndex uint32, err
169175 default :
170176 }
171177
178+ telemetry .ReportEvent (ctx , "waiting for NBD connection" )
179+
172180 s , err := nbdnl .Status (deviceIndex )
173181 if err == nil && s .Connected {
174182 break
@@ -177,6 +185,8 @@ func (d *DirectPathMount) Open(ctx context.Context) (retDeviceIndex uint32, err
177185 time .Sleep (100 * time .Nanosecond )
178186 }
179187
188+ telemetry .ReportEvent (ctx , "connected to NBD" )
189+
180190 return deviceIndex , nil
181191}
182192
0 commit comments