@@ -218,12 +218,11 @@ func (xc *XenContext) Stats(ctx *hypervisor.VmContext) (*types.PodStats, error)
218218func (xc * XenContext ) Close () {}
219219
220220func (xc * XenContext ) AddDisk (ctx * hypervisor.VmContext , sourceType string , blockInfo * hypervisor.DiskDescriptor , result chan <- hypervisor.VmEvent ) {
221- name := blockInfo .Name
222221 filename := blockInfo .Filename
223222 format := blockInfo .Format
224223 id := blockInfo .ScsiId
225224
226- go diskRoutine (true , xc , ctx , name , sourceType , filename , format , id , nil , result )
225+ go diskRoutine (true , xc , ctx , sourceType , filename , format , id , nil , result )
227226}
228227
229228func (xc * XenContext ) RemoveDisk (ctx * hypervisor.VmContext , blockInfo * hypervisor.DiskDescriptor , callback hypervisor.VmEvent , result chan <- hypervisor.VmEvent ) {
@@ -305,7 +304,7 @@ func (xd *XenDriver) SupportVmSocket() bool {
305304}
306305
307306func diskRoutine (add bool , xc * XenContext , ctx * hypervisor.VmContext ,
308- name , sourceType , filename , format string , id int , callback hypervisor.VmEvent , result chan <- hypervisor.VmEvent ) {
307+ sourceType , filename , format string , id int , callback hypervisor.VmEvent , result chan <- hypervisor.VmEvent ) {
309308 backend := LIBXL_DISK_BACKEND_TAP
310309 if strings .HasPrefix (filename , "/dev/" ) {
311310 backend = LIBXL_DISK_BACKEND_PHY
@@ -321,10 +320,7 @@ func diskRoutine(add bool, xc *XenContext, ctx *hypervisor.VmContext,
321320 if add {
322321 res = HyperxlDiskAdd (xc .driver .Ctx , uint32 (xc .domId ), filename , devName , LibxlDiskBackend (backend ), LibxlDiskFormat (dfmt ))
323322 callback = & hypervisor.BlockdevInsertedEvent {
324- Name : name ,
325- SourceType : sourceType ,
326323 DeviceName : devName ,
327- ScsiId : id ,
328324 }
329325 } else {
330326 op = "remove"
0 commit comments