On Wed, Jul 23, 2014 at 07:15:58AM -0700, Christoph Hellwig wrote: > On Wed, Jul 23, 2014 at 03:10:28PM +0100, Sitsofe Wheeler wrote: > > I'm not sure this alone will work - won't sdev_bflags/bflags have > > already been built at this point? > > They've been built up, but we can still or new values into it. It looks > fine to me from review, but if you can test it on an actualy hypverv > setup that would be valueable feedback. The previous patches didn't work for me with a Windows 2012 R2 host with a 3.16.0-rc6.x86_64-00076-g2f7d2ec-dirty guest. After applying https://patchwork.kernel.org/patch/4541201 (which needed a small fixup) and https://patchwork.kernel.org/patch/4598601 and the attached debugging output patch here's the result I got: hv_vmbus: registering driver hv_storvsc scsi0 : storvsc_host_t scsi 0:0:0:0: scsi_get_device_flags_keyed: key: 3 scsi 0:0:0:0: scsi_get_device_flags_keyed: Post SCSI_DEVINFO_GLOBAL scsi 0:0:0:0: scsi_get_device_flags_keyed: No sdev_bflags scsi 0:0:0:0: sdev->scsi_level: 5 scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 4 scsi 0:0:0:0: scsi_add_lun: Have BLIST_TRY_VPD_PAGES? No scsi 0:0:0:0: storvsc_device_configure: Added BLIST_TRY_VPD_PAGES scsi1 : storvsc_host_t sd 0:0:0:0: Attached scsi generic sg0 type 0 scsi 1:0:0:0: scsi_get_device_flags_keyed: key: 3 scsi 1:0:0:0: scsi_get_device_flags_keyed: Post SCSI_DEVINFO_GLOBAL scsi 1:0:0:0: scsi_get_device_flags_keyed: No sdev_bflags scsi 1:0:0:0: sdev->scsi_level: 5 scsi 1:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 4 scsi 1:0:0:0: scsi_add_lun: Have BLIST_TRY_VPD_PAGES? No scsi 1:0:0:0: storvsc_device_configure: Added BLIST_TRY_VPD_PAGES scsi 1:0:0:1: scsi_get_device_flags_keyed: key: 5 scsi 1:0:0:1: scsi_get_device_flags_keyed: Post SCSI_DEVINFO_GLOBAL scsi 1:0:0:1: scsi_get_device_flags_keyed: No sdev_bflags scsi 1:0:0:1: scsi_get_device_flags_keyed: key: 5 scsi 1:0:0:1: scsi_get_device_flags_keyed: Post SCSI_DEVINFO_GLOBAL scsi 1:0:0:1: scsi_get_device_flags_keyed: No sdev_bflags scsi 1:0:0:1: sdev->scsi_level: 0 scsi 1:0:0:1: Direct-Access ADATA SSD S510 120GB 5.2. PQ: 0 ANSI: 0 scsi 1:0:0:1: scsi_add_lun: Have BLIST_TRY_VPD_PAGES? No scsi 1:0:0:1: storvsc_device_configure: Added BLIST_TRY_VPD_PAGES scsi 1:0:0:3: scsi_get_device_flags_keyed: key: 0 scsi 1:0:0:3: scsi_get_device_flags_keyed: Post SCSI_DEVINFO_GLOBAL scsi 1:0:0:3: scsi_get_device_flags_keyed: No sdev_bflags scsi 1:0:0:3: sdev->scsi_level: 5 scsi 1:0:0:3: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 4 scsi 1:0:0:3: scsi_add_lun: Have BLIST_TRY_VPD_PAGES? No scsi 1:0:0:3: storvsc_device_configure: Added BLIST_TRY_VPD_PAGES sd 1:0:0:0: sd_try_rc16_first: sdp->scsi_level: 5 sd 1:0:0:0: [sdb] 2097152 512-byte logical blocks: (1.07 GB/1.00 GiB) sd 1:0:0:0: [sdb] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:0: [sdb] sd_revalidate_disk: Skipped extended inquiries sd 1:0:0:0: [sdb] Write Protect is off sd 1:0:0:0: [sdb] Mode Sense: 0f 00 00 00 sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: sd_try_rc16_first: sdp->scsi_level: 5 ata_piix 0000:00:07.1: version 2.13 sd 1:0:0:0: sd_try_rc16_first: sdp->scsi_level: 5 sd 1:0:0:0: [sdb] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:0: [sdb] sd_revalidate_disk: Skipped extended inquiries sdb: unknown partition table ata_piix 0000:00:07.1: Hyper-V Virtual Machine detected, ATA device ignore set sd 1:0:0:0: sd_try_rc16_first: sdp->scsi_level: 5 sd 1:0:0:0: [sdb] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:0: [sdb] sd_revalidate_disk: Skipped extended inquiries sd 1:0:0:0: [sdb] Attached SCSI disk sd 1:0:0:0: Attached scsi generic sg1 type 0 sd 0:0:0:0: [sda] 8388608 512-byte logical blocks: (4.29 GB/4.00 GiB) scsi2 : ata_piix scsi3 : ata_piix ata1: PATA max UDMA/33 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14 ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15 sd 1:0:0:1: Attached scsi generic sg2 type 0 libphy: Fixed MDIO Bus: probed hv_vmbus: registering driver hv_netvsc sd 1:0:0:3: Attached scsi generic sg3 type 0 hv_netvsc: hv_netvsc channel opened successfully sd 0:0:0:0: [sda] sd_revalidate_disk: Extended inquiry check... sd 0:0:0:0: [sda] sd_revalidate_disk: Skipped extended inquiries sd 1:0:0:1: sd_try_rc16_first: sdp->scsi_level: 0 sd 1:0:0:3: sd_try_rc16_first: sdp->scsi_level: 5 sd 1:0:0:1: [sdc] 234441648 512-byte logical blocks: (120 GB/111 GiB) sd 1:0:0:1: [sdc] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:1: [sdc] sd_revalidate_disk: Skipped extended inquiries sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: sd_try_rc16_first: sdp->scsi_level: 5 sd 0:0:0:0: [sda] sd_revalidate_disk: Extended inquiry check... sd 0:0:0:0: [sda] sd_revalidate_disk: Skipped extended inquiries sda: sda1 sd 0:0:0:0: sd_try_rc16_first: sdp->scsi_level: 5 sd 0:0:0:0: [sda] sd_revalidate_disk: Extended inquiry check... sd 0:0:0:0: [sda] sd_revalidate_disk: Skipped extended inquiries sd 0:0:0:0: [sda] Attached SCSI disk sd 1:0:0:1: [sdc] Write Protect is off sd 1:0:0:3: [sdd] 199229440 512-byte logical blocks: (102 GB/95.0 GiB) sd 1:0:0:3: [sdd] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:3: [sdd] sd_revalidate_disk: Skipped extended inquiries sd 1:0:0:3: [sdd] Write Protect is off sd 1:0:0:3: [sdd] Mode Sense: 0f 00 00 00 sd 1:0:0:3: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 1:0:0:1: [sdc] Mode Sense: 0f 00 00 00 sd 1:0:0:3: sd_try_rc16_first: sdp->scsi_level: 5 sd 1:0:0:1: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 1:0:0:3: [sdd] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:3: [sdd] sd_revalidate_disk: Skipped extended inquiries sdd: unknown partition table sd 1:0:0:3: sd_try_rc16_first: sdp->scsi_level: 5 sd 1:0:0:3: [sdd] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:3: [sdd] sd_revalidate_disk: Skipped extended inquiries sd 1:0:0:3: [sdd] Attached SCSI disk sd 1:0:0:1: sd_try_rc16_first: sdp->scsi_level: 0 sd 1:0:0:1: [sdc] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:1: [sdc] sd_revalidate_disk: Skipped extended inquiries sdc: sdc1 sd 1:0:0:1: sd_try_rc16_first: sdp->scsi_level: 0 sd 1:0:0:1: [sdc] sd_revalidate_disk: Extended inquiry check... sd 1:0:0:1: [sdc] sd_revalidate_disk: Skipped extended inquiries ata1.00: host indicates ignore ATA devices, ignored sd 1:0:0:1: [sdc] Attached SCSI disk tsc: Refined TSC clocksource calibration: 3200.069 MHz sda is a 4 GByte VHDX attached to Hyper-V's IDE interface. sdb is a 1 GByte VHDX attached to Hyper-V's SCSI interface. sdc is a 111.8 GByte SSD being passed through Hyper-V's SCSI interface. sdd is a 95 GByte VHDX being passed through Hyper-V's SCSI interface. -- Sitsofe | http://sucs.org/~sits/