SCSI regression in 4.11
Subsystems (2)
Something in SCSI in 4.11 broke booting on Hyper-V Generation 2 VM with 8 VCPU and 4G of memory. Both Linus's current tree (4.11 pre-rc1) and linux-next fail in a similar manner. It looks like some error in SCSI device detection because there is only a single device.
The offending commit causing the regression is:
$ git bisect bad e9c787e65c0c36529745be47d490d998b4b6e589 is the first bad commit commit e9c787e65c0c36529745be47d490d998b4b6e589 Author: Christoph Hellwig <[email protected]> Date: Mon Jan 2 21:55:26 2017 +0300
scsi: allocate scsi_cmnd structures as part of struct request
Rely on the new block layer functionality to allocate additional driver specific data behind struct request instead of implementing it in SCSI itѕelf.
:040000 040000 6ff016fcdae227efeb19c1c301b17ccd7ea35da6 70d79f99d9b79ecf4dccbe067fc697219f5c78da M drivers
:040000 040000 a672ff52df8b2c211b3f98cae4a88d8a96ccde0b 1aaaed7de0994f597c7f8290c722a0b4a7789429 M include
I checked and tree is current and up to date and includes commit ee5242360424b9b967454e9183767323d10cf985
Author: Christoph Hellwig <[email protected]> Date: Tue Feb 21 10:04:55 2017 +0100
scsi: zero per-cmd driver data before each I/O
Kernel config is attached. It started with Ubuntu config, but then did localmodconfig and pruned out unnecessary stuff.
The kernel log before hang is:
[ 0.000000] Linux version 4.10.0+ (shemminger@ubuntu-vm) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #34 SMP Mon Feb 27 15:19:23 PST 2017 [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.10.0+ root=UUID=75c9872d-47e9-4a8d-b416-1f52faed205b ro console=tty0 console=ttyS0,115200n8 [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format. [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000f6ee5fff] usable [ 0.000000] BIOS-e820: [mem 0x00000000f6ee6000-0x00000000f6ee6fff] ACPI data [ 0.000000] BIOS-e820: [mem 0x00000000f6ee7000-0x00000000f6eedfff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f6eee000-0x00000000f6ef1fff] ACPI data [ 0.000000] BIOS-e820: [mem 0x00000000f6ef2000-0x00000000f6f1afff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f6f1b000-0x00000000f7f9afff] usable [ 0.000000] BIOS-e820: [mem 0x00000000f7f9b000-0x00000000f7fb6fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f7fb7000-0x00000000f7fb8fff] type 20 [ 0.000000] BIOS-e820: [mem 0x00000000f7fb9000-0x00000000f7fbafff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f7fbb000-0x00000000f7fbbfff] type 20 [ 0.000000] BIOS-e820: [mem 0x00000000f7fbc000-0x00000000f7fbdfff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f7fbe000-0x00000000f7fbefff] type 20 [ 0.000000] BIOS-e820: [mem 0x00000000f7fbf000-0x00000000f7fc0fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f7fc1000-0x00000000f7fc1fff] type 20 [ 0.000000] BIOS-e820: [mem 0x00000000f7fc2000-0x00000000f7fc3fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f7fc4000-0x00000000f7fc5fff] type 20 [ 0.000000] BIOS-e820: [mem 0x00000000f7fc6000-0x00000000f7fc7fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f7fc8000-0x00000000f7fc8fff] type 20 [ 0.000000] BIOS-e820: [mem 0x00000000f7fc9000-0x00000000f7ff2fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f7ff3000-0x00000000f7ffafff] ACPI data [ 0.000000] BIOS-e820: [mem 0x00000000f7ffb000-0x00000000f7ffefff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x00000000f7fff000-0x00000000f7ffffff] usable [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x0000000207ffffff] usable [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] efi: EFI v2.31 by EDK II [ 0.000000] efi: ACPI=0xf7ffa000 ACPI 2.0=0xf7ffa014 SMBIOS=0xf7ff2000 PROP=0x7fb93d8 MEMATTR=0xf72add18 [ 0.000000] SMBIOS 2.4 present. [ 0.000000] DMI: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v1.0 11/26/2012 [ 0.000000] Hypervisor detected: Microsoft HyperV [ 0.000000] HyperV: features 0x2e7f, hints 0x2c2c [ 0.000000] Hyper-V Host Build:14393-10.0-0-0.576 [ 0.000000] HyperV: LAPIC Timer Frequency: 0xc3500 [ 0.000000] tsc: Marking TSC unstable due to running on Hyper-V [ 0.000000] e820: last_pfn = 0x208000 max_arch_pfn = 0x400000000 [ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT [ 0.000000] e820: last_pfn = 0xf8000 max_arch_pfn = 0x400000000 [ 0.000000] Scanning 1 areas for low memory corruption [ 0.000000] Using GB pages for direct mapping [ 0.000000] Secure boot could not be determined [ 0.000000] RAMDISK: [mem 0x34cea000-0x3666cfff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000F7FFA014 000024 (v02 VRTUAL) [ 0.000000] ACPI: XSDT 0x00000000F7FF90E8 000064 (v01 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.000000] ACPI: FACP 0x00000000F7FF7000 0000F4 (v04 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.000000] ACPI: DSDT 0x00000000F6EEF000 00256F (v02 MSFTVM DSDT01 00000001 MSFT 04000000) [ 0.000000] ACPI: FACS 0x00000000F7FFE000 000040 [ 0.000000] ACPI: APIC 0x00000000F7FF8000 0007D2 (v02 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.000000] ACPI: OEM0 0x00000000F7FF6000 000064 (v01 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.000000] ACPI: WAET 0x00000000F7FF5000 000028 (v01 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.000000] ACPI: OEM1 0x00000000F7FF4000 00009E (v02 MSFTVM UARTS 00000001 MSFT 04000000) [ 0.000000] ACPI: OEM2 0x00000000F7FF3000 0002E2 (v02 MSFTVM VTPM2 00000001 MSFT 04000000) [ 0.000000] ACPI: SRAT 0x00000000F6EEE000 0001D0 (v02 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.000000] ACPI: BGRT 0x00000000F6EE6000 000038 (v01 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.000000] SRAT: PXM 0 -> APIC 0x00 -> Node 0 [ 0.000000] SRAT: PXM 0 -> APIC 0x01 -> Node 0 [ 0.000000] SRAT: PXM 0 -> APIC 0x02 -> Node 0 [ 0.000000] SRAT: PXM 0 -> APIC 0x03 -> Node 0 [ 0.000000] SRAT: PXM 0 -> APIC 0x04 -> Node 0 [ 0.000000] SRAT: PXM 0 -> APIC 0x05 -> Node 0 [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0xf7ffffff] hotplug [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x100000000-0x207ffffff] hotplug [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x208200000-0xfdfffffff] hotplug [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x1000000000-0xffffffffff] hotplug [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x10000200000-0x1ffffffffff] hotplug [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x20000200000-0x3ffffffffff] hotplug [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x40000200000-0x7ffffffffff] hotplug [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x80000200000-0xfffffffffff] hotplug [ 0.000000] NUMA: Node 0 [mem 0x00000000-0xf7ffffff] + [mem 0x100000000-0x207ffffff] -> [mem 0x00000000-0x207ffffff] [ 0.000000] NODE_DATA(0) allocated [mem 0x207ffb000-0x207ffffff] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] [ 0.000000] Normal [mem 0x0000000100000000-0x0000000207ffffff] [ 0.000000] Device empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009ffff] [ 0.000000] node 0: [mem 0x0000000000100000-0x00000000f6ee5fff] [ 0.000000] node 0: [mem 0x00000000f6f1b000-0x00000000f7f9afff] [ 0.000000] node 0: [mem 0x00000000f7fff000-0x00000000f7ffffff] [ 0.000000] node 0: [mem 0x0000000100000000-0x0000000207ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x0000000207ffffff] [ 0.000000] ACPI: PM-Timer IO Port: 0x408 [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1]) [ 0.000000] IOAPIC[0]: apic_id 6, version 17, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] efi: requested map not found. [ 0.000000] efi: Failed to lookup EFI memory descriptor for 0x00000000f6ee7000 [ 0.000000] smpboot: Allowing 240 CPUs, 234 hotplug CPUs [ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff] [ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000fffff] [ 0.000000] PM: Registered nosave memory: [mem 0xf6ee6000-0xf6ee6fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf6ee7000-0xf6eedfff] [ 0.000000] PM: Registered nosave memory: [mem 0xf6eee000-0xf6ef1fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf6ef2000-0xf6f1afff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7f9b000-0xf7fb6fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fb7000-0xf7fb8fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fb9000-0xf7fbafff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fbb000-0xf7fbbfff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fbc000-0xf7fbdfff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fbe000-0xf7fbefff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fbf000-0xf7fc0fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fc1000-0xf7fc1fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fc2000-0xf7fc3fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fc4000-0xf7fc5fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fc6000-0xf7fc7fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fc8000-0xf7fc8fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7fc9000-0xf7ff2fff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7ff3000-0xf7ffafff] [ 0.000000] PM: Registered nosave memory: [mem 0xf7ffb000-0xf7ffefff] [ 0.000000] PM: Registered nosave memory: [mem 0xf8000000-0xffffffff] [ 0.000000] e820: [mem 0xf8000000-0xffffffff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on bare hardware [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 30582079743023 ns [ 0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:240 nr_node_ids:1 [ 0.000000] percpu: Embedded 37 pages/cpu @ffff945a7ba00000 s111192 r8192 d32168 u262144 [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 2063566 [ 0.000000] Policy zone: Normal [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.10.0+ root=UUID=75c9872d-47e9-4a8d-b416-1f52faed205b ro console=tty0 console=ttyS0,115200n8 [ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes [ 0.000000] log_buf_len total cpu_extra contributions: 978944 bytes [ 0.000000] log_buf_len min size: 262144 bytes [ 0.000000] log_buf_len: 2097152 bytes [ 0.000000] early log buf free: 248064(94%) [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) [ 0.000000] Memory: 8039676K/8387608K available (8411K kernel code, 1407K rwdata, 3428K rodata, 1516K init, 1132K bss, 347932K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=240, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] Build-time adjustment of leaf fanout to 64. [ 0.000000] RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=240. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=240 [ 0.000000] Using NULL legacy PIC [ 0.000000] NR_IRQS:33024 nr_irqs:2344 0 [ 0.000000] Console: colour dummy device 80x25 [ 0.000000] console [tty0] enabled [ 0.000000] console [ttyS0] enabled [ 0.000000] tsc: Fast TSC calibration failed [ 0.000000] tsc: Unable to calibrate against PIT [ 0.000000] tsc: using PMTIMER reference calibration [ 0.000000] tsc: Detected 3205.648 MHz processor [ 0.000035] Calibrating delay loop (skipped), value calculated using timer frequency.. 6411.29 BogoMIPS (lpj=12822592) [ 0.004000] pid_max: default: 245760 minimum: 1920 [ 0.004000] ACPI: Core revision 20170119 [ 0.004000] ACPI: 1 ACPI AML tables successfully acquired and loaded [ 0.004000] Security Framework initialized [ 0.004000] Yama: becoming mindful. [ 0.004000] AppArmor: AppArmor initialized [ 0.004000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes) [ 0.004000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes) [ 0.004000] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes) [ 0.004000] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes) [ 0.004000] CPU: Physical Processor ID: 0 [ 0.004000] CPU: Processor Core ID: 0 [ 0.004000] mce: CPU supports 1 MCE banks [ 0.004000] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8 [ 0.004000] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4 [ 0.004000] Freeing SMP alternatives memory: 32K [ 0.004000] ftrace: allocating 31694 entries in 124 pages [ 0.004000] smpboot: Max logical packages: 30 [ 0.004000] Switched APIC routing to physical flat. [ 0.004000] clocksource: hyperv_clocksource_tsc_page: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns [ 0.004000] smpboot: CPU0: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz (family: 0x6, model: 0x4f, stepping: 0x1) [ 0.004000] Performance Events: unsupported p6 CPU model 79 no PMU driver, software events only. [ 0.005449] NMI watchdog: disabled (cpu0): hardware events not enabled [ 0.008002] NMI watchdog: Shutting down hard lockup detector on all cpus [ 0.010421] smp: Bringing up secondary CPUs ... [ 0.012102] x86: Booting SMP configuration: [ 0.013804] .... node #0, CPUs: #1 #2 #3 #4 #5 [ 0.412070] smp: Brought up 1 node, 6 CPUs [ 0.415212] smpboot: Total of 6 processors activated (41344.07 BogoMIPS) [ 0.416726] devtmpfs: initialized [ 0.417753] x86/mm: Memory block size: 128MB [ 0.421417] evm: security.selinux [ 0.424002] evm: security.SMACK64 [ 0.425643] evm: security.SMACK64EXEC [ 0.427439] evm: security.SMACK64TRANSMUTE [ 0.428002] evm: security.SMACK64MMAP [ 0.429243] evm: security.ima [ 0.430256] evm: security.capability [ 0.432042] PM: Registering ACPI NVS region [mem 0xf7ffb000-0xf7ffefff] (16384 bytes) [ 0.434674] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.436121] futex hash table entries: 65536 (order: 10, 4194304 bytes) [ 0.440552] pinctrl core: initialized pinctrl subsystem [ 0.442559] RTC time: 23:49:14, date: 02/27/17 [ 0.444000] NET: Registered protocol family 16 [ 0.444160] cpuidle: using governor ladder [ 0.445391] cpuidle: using governor menu [ 0.446674] PCCT header not found. [ 0.448028] ACPI: bus type PCI registered [ 0.449286] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 0.452087] PCI: Fatal: No config space access function found [ 0.454272] HugeTLB registered 1 GB page size, pre-allocated 0 pages [ 0.456002] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.460253] ACPI: Added _OSI(Module Device) [ 0.461629] ACPI: Added _OSI(Processor Device) [ 0.463075] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.464002] ACPI: Added _OSI(Processor Aggregator Device) [ 0.468066] ACPI: Executed 1 blocks of module-level executable AML code [ 0.469174] ACPI: Dynamic OEM Table Load: [ 0.470593] ACPI: Interpreter enabled [ 0.471108] ACPI: (supports S0 S5) [ 0.471561] ACPI: Using IOAPIC for interrupt routing [ 0.472000] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.479952] ACPI: Enabled 1 GPEs in block 00 to 0F [ 0.488195] vgaarb: loaded [ 0.489040] SCSI subsystem initialized [ 0.490387] ACPI: bus type USB registered [ 0.490387] usbcore: registered new interface driver usbfs [ 0.492009] usbcore: registered new interface driver hub [ 0.493851] usbcore: registered new device driver usb [ 0.495544] Registered efivars operations [ 0.503255] PCI: Using ACPI for IRQ routing [ 0.504002] PCI: System does not support PCI [ 0.505929] NetLabel: Initializing [ 0.507288] NetLabel: domain hash size = 128 [ 0.508001] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO [ 0.510000] NetLabel: unlabeled traffic allowed by default [ 0.512096] clocksource: Switched to clocksource hyperv_clocksource_tsc_page [ 0.522476] VFS: Disk quotas dquot_6.6.0 [ 0.523891] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.525814] AppArmor: AppArmor Filesystem Enabled [ 0.527431] pnp: PnP ACPI init [ 0.528622] pnp: PnP ACPI: found 3 devices [ 0.536176] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 0.539588] NET: Registered protocol family 2 [ 0.540786] TCP established hash table entries: 65536 (order: 7, 524288 bytes) [ 0.543264] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes) [ 0.545165] TCP: Hash tables configured (established 65536 bind 65536) [ 0.547597] UDP hash table entries: 4096 (order: 5, 131072 bytes) [ 0.549243] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes) [ 0.551704] NET: Registered protocol family 1 [ 0.552890] Trying to unpack rootfs image as initramfs... [ 0.814298] Freeing initrd memory: 26124K [ 0.815681] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) [ 0.817264] software IO TLB [mem 0xf2ee6000-0xf6ee6000] (64MB) mapped at [ffff945972ee6000-ffff945976ee5fff] [ 0.820280] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2e35216b7da, max_idle_ns: 440795326598 ns [ 0.823447] Scanning for low memory corruption every 60 seconds [ 0.828376] audit: initializing netlink subsys (disabled) [ 0.830157] audit: type=2000 audit(1488239353.828:1): state=initialized audit_enabled=0 res=1 [ 0.830195] Initialise system trusted keyrings [ 0.830437] workingset: timestamp_bits=40 max_order=21 bucket_order=0 [ 0.831592] zbud: loaded [ 0.832215] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.839021] fuse init (API version 7.26) [ 0.840241] Allocating IMA blacklist keyring. [ 0.844551] Key type asymmetric registered [ 0.845970] Asymmetric key parser 'x509' registered [ 0.847640] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248) [ 0.850400] io scheduler noop registered [ 0.851751] io scheduler deadline registered (default) [ 0.853291] io scheduler cfq registered [ 0.854618] io scheduler mq-deadline registered [ 0.856374] efifb: probing for efifb [ 0.858423] efifb: framebuffer at 0xf8000000, using 3072k, total 3072k [ 0.860777] efifb: mode is 1024x768x32, linelength=4096, pages=1 [ 0.862830] efifb: scrolling: redraw [ 0.864068] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0 [ 0.868498] Console: switching to colour frame buffer device 128x48 [ 0.871853] fb0: EFI VGA frame buffer device [ 0.873242] GHES: HEST is not enabled! [ 0.874304] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled [ 0.898019] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 0.924361] 00:02: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 0.929056] Linux agpgart interface v0.103 [ 0.935497] brd: module loaded [ 0.939892] loop: module loaded [ 0.941058] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.943249] ehci-pci: EHCI PCI platform driver [ 0.944485] ehci-platform: EHCI generic platform driver [ 0.946399] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.948198] ohci-pci: OHCI PCI platform driver [ 0.953339] ohci-platform: OHCI generic platform driver [ 0.956794] uhci_hcd: USB Universal Host Controller Interface driver [ 0.958963] i8042: PNP: No PS/2 controller found. [ 0.960371] mousedev: PS/2 mouse device common for all mice [ 0.962502] rtc_cmos 00:00: RTC can wake from S4 [ 0.985511] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0 [ 0.988447] rtc_cmos 00:00: alarms up to one month, 114 bytes nvram [ 0.990591] i2c /dev entries driver [ 0.992283] ledtrig-cpu: registered to indicate activity on CPUs [ 0.994406] EFI Variables Facility v0.08 2004-May-17 [ 0.998565] NET: Registered protocol family 10 [ 1.000852] Segment Routing with IPv6 [ 1.002997] NET: Registered protocol family 17 [ 1.004701] Key type dns_resolver registered [ 1.006961] registered taskstats version 1 [ 1.008674] Loading compiled-in X.509 certificates [ 1.012835] Loaded X.509 cert 'Build time autogenerated kernel key: ca70123d72bed0e2904a70aa2b0b6f4fa0fb1804' [ 1.022308] zswap: loaded using pool lzo/zbud [ 1.038107] Key type big_key registered [ 1.040925] Key type trusted registered [ 1.056253] Key type encrypted registered [ 1.066265] AppArmor: AppArmor sha1 policy hashing enabled [ 1.068467] ima: No TPM chip found, activating TPM-bypass! (rc=-19) [ 1.071147] evm: HMAC attrs: 0x1 [ 1.072499] Magic number: 5:234:859 [ 1.074618] rtc_cmos 00:00: setting system clock to 2017-02-27 23:49:14 UTC (1488239354) [ 1.077524] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 1.080019] EDD information not available. [ 1.083694] Freeing unused kernel memory: 1516K [ 1.085304] Write protecting the kernel read-only data: 14336k [ 1.088127] Freeing unused kernel memory: 1816K [ 1.093583] Freeing unused kernel memory: 668K [ 1.106198] x86/mm: Checked W+X mappings: passed, no W+X pages found. Loading, please wait... starting version 231 [ 1.136892] random: systemd-udevd: uninitialized urandom read (16 bytes read) [ 1.137232] random: udevadm: uninitialized urandom read (16 bytes read) [ 1.137252] random: udevadm: uninitialized urandom read (16 bytes read) [ 1.145695] random: systemd-udevd: uninitialized urandom read (16 bytes read) [ 1.149047] random: systemd-udevd: uninitialized urandom read (16 bytes read) [ 1.153773] random: systemd-udevd: uninitialized urandom read (16 bytes read) [ 1.162354] random: udevadm: uninitialized urandom read (16 bytes read) [ 1.164571] random: udevadm: uninitialized urandom read (16 bytes read) [ 1.167146] random: udevadm: uninitialized urandom read (16 bytes read) [ 1.189044] random: udevadm: uninitialized urandom read (16 bytes read) [ 1.210046] hv_vmbus: Vmbus version:4.0 [ 1.260006] AVX2 version of gcm_enc/dec engaged. [ 1.262401] AES CTR mode by8 optimization enabled [ 1.288013] hv_vmbus: registering driver hyperv_keyboard [ 1.291502] hidraw: raw HID events driver (C) Jiri Kosina [ 1.294661] hv_utils: Registering HyperV Utility Driver [ 1.297256] hv_vmbus: registering driver hv_util [ 1.300005] hv_vmbus: registering driver hid_hyperv [ 1.303162] hv_vmbus: registering driver hv_netvsc [ 1.306422] input: AT Translated Set 2 keyboard as /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/VMBUS:00/d34b2567-b9b6-42b9-8778-0a4ec0b955bf/serio0/input/input0 [ 1.332832] hv_utils: Heartbeat IC version 3.0 [ 1.335742] hv_vmbus: registering driver hv_storvsc [ 1.337313] input: Microsoft Vmbus HID-compliant Mouse as /devices/0006:045E:0621.0001/input/input1 [ 1.337371] hid 0006:045E:0621.0001: input: <UNKNOWN> HID v0.01 Mouse [Microsoft Vmbus HID-compliant Mouse] on [ 1.364065] hv_utils: cannot register PTP clock: 0 [ 1.366580] hv_utils: Shutdown IC version 3.0 [ 1.368982] hv_utils: TimeSync IC version 4.0 [ 1.391920] scsi host0: storvsc_host_t [ 1.394415] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 1.394919] hv_utils: VSS IC version 5.0 [ 1.400551] scsi host1: storvsc_host_t [ 1.402610] scsi 1:0:0:0: CD-ROM Msft Virtual DVD-ROM 1.0 PQ: 0 ANSI: 0 [ 1.405530] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.408075] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0 [ 1.410796] scsi 1:0:0:2: Direct-Access PQ: 0 ANSI: 0 [ 1.412298] random: fast init done [ 1.415157] scsi 1:0:0:3: Direct-Access PQ: 0 ANSI: 0 [ 1.417001] scsi 1:0:0:4: Direct-Access PQ: 0 ANSI: 0 [ 1.438707] scsi 1:0:0:5: Direct-Access PQ: 0 ANSI: 0 [ 1.441769] scsi 1:0:0:6: Direct-Access PQ: 0 ANSI: 0 [ 1.445824] scsi 1:0:0:7: Direct-Access PQ: 0 ANSI: 0 [ 1.458154] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 1.458276] sd 0:0:0:0: [sda] 266338304 512-byte logical blocks: (136 GB/127 GiB) [ 1.458277] sd 0:0:0:0: [sda] 4096-byte physical blocks [ 1.458303] sd 0:0:0:0: [sda] Write Protect is off [ 1.458369] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 1.462186] sda: sda1 sda2 sda3 [ 1.463198] sd 0:0:0:0: [sda] Attached SCSI disk [ 1.493752] sr 1:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy [ 1.495937] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 1.498676] sr 1:0:0:0: Attached scsi generic sg1 type 5 [ 1.501253] sd 1:0:0:1: Attached scsi generic sg2 type 0 [ 1.501275] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 1.501277] sd 1:0:0:1: [sdb] 1 512-byte logical blocks: (512 B/512 B) [ 1.501278] sd 1:0:0:1: [sdb] 0-byte physical blocks [ 1.501318] sd 1:0:0:1: [sdb] Write Protect is off [ 1.508021] sd 1:0:0:1: [sdb] Asking for cache data failed [ 1.508022] sd 1:0:0:1: [sdb] Assuming drive cache: write through [ 1.508194] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 1.537525] sd 1:0:0:2: Attached scsi generic sg3 type 0 [ 1.537552] sd 1:0:0:2: [sdc] Sector size 0 reported, assuming 512. [ 1.537553] sd 1:0:0:2: [sdc] 1 512-byte logical blocks: (512 B/512 B) [ 1.537554] sd 1:0:0:2: [sdc] 0-byte physical blocks [ 1.537592] sd 1:0:0:2: [sdc] Write Protect is off [ 1.537641] sd 1:0:0:2: [sdc] Asking for cache data failed [ 1.537641] sd 1:0:0:2: [sdc] Assuming drive cache: write through [ 1.537807] sd 1:0:0:2: [sdc] Sector size 0 reported, assuming 512. [ 1.548397] sd 1:0:0:3: Attached scsi generic sg4 type 0 [ 1.548457] sd 1:0:0:3: [sdd] Sector size 0 reported, assuming 512. [ 1.548460] sd 1:0:0:3: [sdd] 1 512-byte logical blocks: (512 B/512 B) [ 1.548461] sd 1:0:0:3: [sdd] 0-byte physical blocks [ 1.548527] sd 1:0:0:3: [sdd] Write Protect is off [ 1.548559] sd 1:0:0:3: [sdd] Asking for cache data failed [ 1.548559] sd 1:0:0:3: [sdd] Assuming drive cache: write through [ 1.548746] sd 1:0:0:3: [sdd] Sector size 0 reported, assuming 512. [ 1.581400] sd 1:0:0:4: Attached scsi generic sg5 type 0 [ 1.581636] sd 1:0:0:4: [sde] Sector size 0 reported, assuming 512. [ 1.581636] sd 1:0:0:4: [sde] 1 512-byte logical blocks: (512 B/512 B) [ 1.581636] sd 1:0:0:4: [sde] 0-byte physical blocks [ 1.581660] sd 1:0:0:4: [sde] Write Protect is off [ 1.581688] sd 1:0:0:4: [sde] Asking for cache data failed [ 1.581688] sd 1:0:0:4: [sde] Assuming drive cache: write through [ 1.581874] sd 1:0:0:4: [sde] Sector size 0 reported, assuming 512. [ 1.596144] sd 1:0:0:5: Attached scsi generic sg6 type 0 [ 1.596287] sd 1:0:0:5: [sdf] Sector size 0 reported, assuming 512. [ 1.596290] sd 1:0:0:5: [sdf] 1 512-byte logical blocks: (512 B/512 B) [ 1.596290] sd 1:0:0:5: [sdf] 0-byte physical blocks [ 1.596353] sd 1:0:0:5: [sdf] Write Protect is off [ 1.596398] sd 1:0:0:5: [sdf] Asking for cache data failed [ 1.596398] sd 1:0:0:5: [sdf] Assuming drive cache: write through [ 1.596608] sd 1:0:0:5: [sdf] Sector size 0 reported, assuming 512. [ 1.636418] sd 1:0:0:6: Attached scsi generic sg7 type 0 [ 1.636514] sd 1:0:0:6: [sdg] Sector size 0 reported, assuming 512. [ 1.636517] sd 1:0:0:6: [sdg] 1 512-byte logical blocks: (512 B/512 B) [ 1.636518] sd 1:0:0:6: [sdg] 0-byte physical blocks [ 1.636577] sd 1:0:0:6: [sdg] Write Protect is off [ 1.636628] sd 1:0:0:6: [sdg] Asking for cache data failed [ 1.636628] sd 1:0:0:6: [sdg] Assuming drive cache: write through [ 1.636906] sd 1:0:0:6: [sdg] Sector size 0 reported, assuming 512. [ 1.674375] sd 1:0:0:7: Attached scsi generic sg8 type 0 [ 1.674490] sd 1:0:0:7: [sdh] Sector size 0 reported, assuming 512. [ 1.674490] sd 1:0:0:7: [sdh] 1 512-byte logical blocks: (512 B/512 B) [ 1.674490] sd 1:0:0:7: [sdh] 0-byte physical blocks [ 1.674560] sd 1:0:0:7: [sdh] Write Protect is off [ 1.674628] sd 1:0:0:7: [sdh] Asking for cache data failed [ 1.674628] sd 1:0:0:7: [sdh] Assuming drive cache: write through [ 1.674819] sd 1:0:0:7: [sdh] Sector size 0 reported, assuming 512. [ 1.693638] ldm_validate_partition_table(): Disk read failed. [ 1.696163] Dev sdb: unable to read RDB block 0 [ 1.697854] sdb: unable to read partition table [ 1.707631] sdb: partition table beyond EOD, enabling native capacity [ 1.720117] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 1.722579] ldm_validate_partition_table(): Disk read failed. [ 1.723849] Dev sdb: unable to read RDB block 0 [ 1.724711] sdb: unable to read partition table [ 1.725754] sdb: partition table beyond EOD, truncated [ 1.726953] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 1.728165] sd 1:0:0:1: [sdb] Attached SCSI disk [ 1.736929] random: crng init done [ 58.336050] hv_utils: KVP IC version 4.0
Quoted 28 lines · On Mon, 27 Feb 2017 15:30:30 -0800 Stephen Hemminger…
Something in SCSI in 4.11 broke booting on Hyper-V Generation 2 VM with 8 VCPU and 4G of memory. Both Linus's current tree (4.11 pre-rc1) and linux-next fail in a similar manner. It looks like some error in SCSI device detection because there is only a single device.
The offending commit causing the regression is:
$ git bisect bad e9c787e65c0c36529745be47d490d998b4b6e589 is the first bad commit commit e9c787e65c0c36529745be47d490d998b4b6e589 Author: Christoph Hellwig <[email protected]> Date: Mon Jan 2 21:55:26 2017 +0300scsi: allocate
scsi_cmndstructures as part of struct requestRely on the new block layer functionality to allocate additional driver specific data behind struct request instead of implementing it in SCSI itѕelf.
Signed-off-by Christoph Hellwig <[email protected]>Reviewed-by Hannes Reinecke <[email protected]>Signed-off-by Jens Axboe <[email protected]>:040000 040000
6ff016fcdae227efeb19c1c301b17ccd7ea35da670d79f99d9b79ecf4dccbe067fc697219f5c78daM drivers
:040000 040000a672ff52df8b2c211b3f98cae4a88d8a96ccde0b1aaaed7de0994f597c7f8290c722a0b4a7789429M includeI checked and tree is current and up to date and includes commit
ee5242360424b9b967454e9183767323d10cf985
Quoted 8 lines
Author: Christoph Hellwig <[email protected]> Date: Tue Feb 21 10:04:55 2017 +0100scsi: zero per-cmd driver data before each I/O
Kernel config is attached. It started with Ubuntu config, but then did localmodconfig and pruned out unnecessary stuff.
This problem I am seeing looks like the one addressed by:
but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits. Tried this, but didn't fix it either...
drivers/scsi/scsi_lib.c +1 -1
@@ -1850,7 +1850,7 @@ static int scsi_mq_prep_fn(struct request *req)/* zero out the cmd, except for the embedded scsi_request */ memset ((char *)cmd +sizeof (cmd->req),0 , -sizeof (*cmd) -sizeof (cmd->req)); +sizeof (*cmd) -sizeof (cmd->req) + sdev->host->hostt->cmd_size); req->special = cmd;
Quoted 40 lines · Stephen Hemminger
Quoted 28 lines · On Mon, 27 Feb 2017 15:30:30 -0800 Stephen Hemminger…
Something in SCSI in 4.11 broke booting on Hyper-V Generation 2 VM with 8 VCPU and 4G of memory. Both Linus's current tree (4.11 pre-rc1) and linux-next fail in a similar manner. It looks like some error in SCSI device detection because there is only a single device.
The offending commit causing the regression is:
$ git bisect bad e9c787e65c0c36529745be47d490d998b4b6e589 is the first bad commit commit e9c787e65c0c36529745be47d490d998b4b6e589 Author: Christoph Hellwig <[email protected]> Date: Mon Jan 2 21:55:26 2017 +0300scsi: allocate
scsi_cmndstructures as part of struct requestRely on the new block layer functionality to allocate additional driver specific data behind struct request instead of implementing it in SCSI itѕelf.
Signed-off-by Christoph Hellwig <[email protected]>Reviewed-by Hannes Reinecke <[email protected]>Signed-off-by Jens Axboe <[email protected]>:040000 040000
6ff016fcdae227efeb19c1c301b17ccd7ea35da670d79f99d9b79ecf4dccbe067fc697219f5c78daM drivers
:040000 040000a672ff52df8b2c211b3f98cae4a88d8a96ccde0b1aaaed7de0994f597c7f8290c722a0b4a7789429M includeI checked and tree is current and up to date and includes commit
ee5242360424b9b967454e9183767323d10cf985Quoted 8 lines
Author: Christoph Hellwig <[email protected]> Date: Tue Feb 21 10:04:55 2017 +0100scsi: zero per-cmd driver data before each I/O
Kernel config is attached. It started with Ubuntu config, but then did localmodconfig and pruned out unnecessary stuff.
Quoted 8 lines
This problem I am seeing looks like the one addressed by:
Fixes ee5242360424 ("scsi: zero per-cmd driver data before each I/O")but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits. Tried this, but didn't fix it either...
Yeah, that fix is already in Linus's tree. But it does look like a replica of what Dexuan reported. Out of curiosity, does it boot if you enable CONFIG_SCSI_MQ_DEFAULT?
Christoph, looks like the previous fix wasn't complete...
Signature · 1 line
Jens Axboe
Quoted 6 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before each I/O")but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits. Tried this, but didn't fix it either...
Are you using blk-mq or the legacy request code?
Quoted 9 lines · Christoph Hellwig
Quoted 6 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before each I/O")but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits. Tried this, but didn't fix it either...
Are you using blk-mq or the legacy request code?
Stephen doesn't have MQ set in the config he posted, I'm assuming he didn't boot with scsi_mod.use_blk_mq=true. In a previous email, I asked if turning on MQ makes a difference.
Signature · 1 line
Jens Axboe
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before eachI/O")
but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits.
Tried this, but didn't fix it either...
Quoted 5 lines
Quoted 1 line
Are you using blk-mq or the legacy request code?
Stephen doesn't have MQ set in the config he posted, I'm assuming he didn't boot with scsi_mod.use_blk_mq=true. In a previous email, I asked if turning on MQ makes a difference.
OK, since we're not making much progress, Stephen, could you insert some debugging into the storvsc driver? The trace clearly shows we're getting zeros back in the buffer when we should have data from the initial scan. Firstly, does the vmbus think it's transferring any data for the INQUIRY and READ_CAPACITY commands (looks like storvsc_command_completion() data_transfer_length)? If it does, there's probably an issue initialising the sg list. If it doesn't, we're probably sending bogus commands.
James
Quoted 27 lines · On Tue, 28 Feb 2017 09:06:13 -0800 James Bottomley <[email protected]>…
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before eachI/O")
but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits.
Tried this, but didn't fix it either...Quoted 5 lines
Quoted 1 line
Are you using blk-mq or the legacy request code?
Stephen doesn't have MQ set in the config he posted, I'm assuming he didn't boot with scsi_mod.use_blk_mq=true. In a previous email, I asked if turning on MQ makes a difference.
OK, since we're not making much progress, Stephen, could you insert some debugging into the storvsc driver? The trace clearly shows we're getting zeros back in the buffer when we should have data from the initial scan. Firstly, does the vmbus think it's transferring any data for the INQUIRY and
READ_CAPACITYcommands (looks likestorvsc_command_completion()data_transfer_length)? If it does, there's probably an issue initialising the sg list. If it doesn't, we're probably sending bogus commands.
Quoted 1 line
James
I tried booting with scsi_mod.use_blk_mq=true and that did nothing. Rebuilding now withCONFIG_SCSI_MQ_DEFAULT=y
Sure, can instrument. after that test.
Quoted 30 lines · Stephen Hemminger
Quoted 27 lines · On Tue, 28 Feb 2017 09:06:13 -0800 James Bottomley <[email protected]>…
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before eachI/O")
but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits.
Tried this, but didn't fix it either...Quoted 5 lines
Quoted 1 line
Are you using blk-mq or the legacy request code?
Stephen doesn't have MQ set in the config he posted, I'm assuming he didn't boot with scsi_mod.use_blk_mq=true. In a previous email, I asked if turning on MQ makes a difference.
OK, since we're not making much progress, Stephen, could you insert some debugging into the storvsc driver? The trace clearly shows we're getting zeros back in the buffer when we should have data from the initial scan. Firstly, does the vmbus think it's transferring any data for the INQUIRY and
READ_CAPACITYcommands (looks likestorvsc_command_completion()data_transfer_length)? If it does, there's probably an issue initialising the sg list. If it doesn't, we're probably sending bogus commands.
Quoted 5 lines
Quoted 1 line
James
I tried booting with scsi_mod.use_blk_mq=true and that did nothing. Rebuilding now with
CONFIG_SCSI_MQ_DEFAULT=y
If you already booted with scsi_mod.use_blk_mq=true and tested that, then don't bother with the config option. They basically toggle the same switch.
Quoted 1 line
Sure, can instrument. after that test.
That'd be great!
Signature · 1 line
Jens Axboe
Quoted 27 lines · On Tue, 28 Feb 2017 09:06:13 -0800 James Bottomley <[email protected]>…
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before eachI/O")
but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits.
Tried this, but didn't fix it either...Quoted 5 lines
Quoted 1 line
Are you using blk-mq or the legacy request code?
Stephen doesn't have MQ set in the config he posted, I'm assuming he didn't boot with scsi_mod.use_blk_mq=true. In a previous email, I asked if turning on MQ makes a difference.
OK, since we're not making much progress, Stephen, could you insert some debugging into the storvsc driver? The trace clearly shows we're getting zeros back in the buffer when we should have data from the initial scan. Firstly, does the vmbus think it's transferring any data for the INQUIRY and
READ_CAPACITYcommands (looks likestorvsc_command_completion()data_transfer_length)? If it does, there's probably an issue initialising the sg list. If it doesn't, we're probably sending bogus commands.
Quoted 2 lines
James
This is log of failed boot of linux-next (with blk_mq enabled). See attached if you want to see exactly what got added.
Sorry don't speak SCSI yet.
[ 1.496999] hv_utils: Registering HyperV Utility Driver [ 1.505415] hv_vmbus: registering driver hv_util [ 1.508074] input: AT Translated Set 2 keyboard as /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/VMBUS:00/d34b2567-b9b6-42b9-8778-0a4ec0b955bf/serio0/input/input0 [ 1.524314] hv_vmbus: registering driver hid_hyperv [ 1.543577] hv_storvsc f71e9b3b-aed9-4dd2-a1ff-c00218a39853: complete init request [ 1.547120] hv_storvsc f71e9b3b-aed9-4dd2-a1ff-c00218a39853: complete init request [ 1.549952] hv_storvsc f71e9b3b-aed9-4dd2-a1ff-c00218a39853: complete init request [ 1.552876] hv_storvsc f71e9b3b-aed9-4dd2-a1ff-c00218a39853: complete init request [ 1.555931] hv_storvsc f71e9b3b-aed9-4dd2-a1ff-c00218a39853: complete init request [ 1.559151] scsi host0: storvsc_host_t [ 1.590197] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.590765] hv_storvsc e7d171c1-a71d-400e-854e-7e0cc000ce3d: complete init request [ 1.590796] hv_storvsc e7d171c1-a71d-400e-854e-7e0cc000ce3d: complete init request [ 1.590820] hv_storvsc e7d171c1-a71d-400e-854e-7e0cc000ce3d: complete init request [ 1.590839] hv_storvsc e7d171c1-a71d-400e-854e-7e0cc000ce3d: complete init request [ 1.590942] hv_storvsc e7d171c1-a71d-400e-854e-7e0cc000ce3d: complete init request [ 1.591506] scsi host1: storvsc_host_t [ 1.600925] hv_utils: Heartbeat IC version 3.0 [ 1.619450] input: Microsoft Vmbus HID-compliant Mouse as /devices/0006:045E:0621.0001/input/input1 [ 1.620658] hid 0006:045E:0621.0001: input: <UNKNOWN> HID v0.01 Mouse [Microsoft Vmbus HID-compliant Mouse] on [ 1.627185] hv_utils: Shutdown IC version 3.0 [ 1.627280] hv_utils: cannot register PTP clock: 0 [ 1.628081] random: fast init done [ 1.628890] hv_utils: TimeSync IC version 4.0 [ 1.629407] hv_utils: VSS IC version 5.0 [ 1.651620] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 1.651956] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.651977] scsi 1:0:0:0: CD-ROM Msft Virtual DVD-ROM 1.0 PQ: 0 ANSI: 0 [ 1.652279] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.652297] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.652299] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0 [ 1.652595] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.652611] scsi 1:0:0:2: Direct-Access PQ: 0 ANSI: 0 [ 1.652892] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.652910] scsi 1:0:0:3: Direct-Access PQ: 0 ANSI: 0 [ 1.653178] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.653195] scsi 1:0:0:4: Direct-Access PQ: 0 ANSI: 0 [ 1.653445] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.653464] scsi 1:0:0:5: Direct-Access PQ: 0 ANSI: 0 [ 1.653729] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.653746] scsi 1:0:0:6: Direct-Access PQ: 0 ANSI: 0 [ 1.669879] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.670143] scsi 1:0:0:7: Direct-Access PQ: 0 ANSI: 0 [ 1.676751] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.743942] hv_storvsc: IO cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 1.747036] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.768853] hv_storvsc: IO cmd 0x12 0x1 0x83 scsi status 0x0 srb status 0x1 length 52 [ 1.774631] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.777923] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.780840] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.783152] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.786505] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.788084] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.788479] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.811204] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.820176] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.820331] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.826554] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.830840] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.831215] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.837045] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.839988] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.840349] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.868201] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.869954] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.876507] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.876864] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.881562] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.882989] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.886024] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.896434] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.911852] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.915128] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.915373] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.924119] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.927047] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.927308] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.932912] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.957147] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.957686] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.961663] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.964497] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.964832] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.974266] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.977079] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.977447] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.990732] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.995647] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.007795] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.007822] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.016152] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.019489] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.022557] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.025126] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.025351] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.049022] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.054078] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.054462] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.059436] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.061848] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.062183] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.066910] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.070172] hv_storvsc: IO cmd 0x9e 0x10 0x0 scsi status 0x0 srb status 0x1 length 32 [ 2.070334] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.075439] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 2.099383] hv_storvsc: IO cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 8 [ 2.099707] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.104995] hv_storvsc: IO cmd 0x12 0x1 0xb2 scsi status 0x0 srb status 0x1 length 8 [ 2.105415] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.110451] hv_storvsc: IO cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 2.110769] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.117049] hv_storvsc: IO cmd 0x12 0x1 0xb0 scsi status 0x0 srb status 0x1 length 64 [ 2.117367] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.122357] hv_storvsc: IO cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 2.122479] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x2 srb status 0x84 length 0 [ 2.122480] hv_storvsc: error status 0x4 [ 2.122511] hv_storvsc: IO cmd 0x1a 0x0 0x2a scsi status 0x2 srb status 0x6 length 128 [ 2.122525] sr 1:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy [ 2.122526] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 2.122828] sr 1:0:0:0: Attached scsi generic sg1 type 5 [ 2.122934] sd 1:0:0:1: Attached scsi generic sg2 type 0 [ 2.123014] sd 1:0:0:2: Attached scsi generic sg3 type 0 [ 2.123086] hv_storvsc: IO cmd 0x4a 0x1 0x0 scsi status 0x0 srb status 0x1 length 8 [ 2.123124] sd 1:0:0:3: Attached scsi generic sg4 type 0 [ 2.123134] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 0 [ 2.123135] hv_storvsc: error status 0x20 [ 2.123221] sd 1:0:0:4: Attached scsi generic sg5 type 0 [ 2.123193] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.123211] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 0 [ 2.123195] hv_storvsc: error status 0x20 [ 2.123212] hv_storvsc: error status 0x20 [ 2.123209] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 0 [ 2.123210] hv_storvsc: error status 0x20 [ 2.123248] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.123232] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 0 [ 2.123249] hv_storvsc: error status 0x20 [ 2.123232] hv_storvsc: error status 0x20 [ 2.123246] sd 1:0:0:2: [sdc] Sector size 0 reported, assuming 512. [ 2.123248] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 2.123249] sd 1:0:0:2: [sdc] 1 512-byte logical blocks: (512 B/512 B) [ 2.123250] sd 1:0:0:1: [sdb] 1 512-byte logical blocks: (512 B/512 B) [ 2.123250] sd 1:0:0:2: [sdc] 0-byte physical blocks [ 2.123282] sd 1:0:0:1: [sdb] 0-byte physical blocks [ 2.123291] hv_storvsc: IO cmd 0x1a 0x0 0x3f scsi status 0x0 srb status 0x20 length 4 [ 2.123274] hv_storvsc: IO cmd 0x1a 0x0 0x3f scsi status 0x0 srb status 0x20 length 4 [ 2.123288] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.123288] hv_storvsc: error status 0x20 [ 2.123288] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.123288] hv_storvsc: error status 0x20 [ 2.123284] sd 1:0:0:2: [sdc] Write Protect is off [ 2.123291] sd 1:0:0:3: [sdd] Sector size 0 reported, assuming 512. [ 2.123321] sd 1:0:0:5: Attached scsi generic sg6 type 0 [ 2.123291] sd 1:0:0:3: [sdd] 1 512-byte logical blocks: (512 B/512 B) [ 2.123294] sd 1:0:0:3: [sdd] 0-byte physical blocks [ 2.123325] hv_storvsc: IO cmd 0x1a 0x0 0x8 scsi status 0x0 srb status 0x20 length 4 [ 2.123305] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 0 [ 2.123305] hv_storvsc: error status 0x20 [ 2.123312] hv_storvsc: IO cmd 0x1a 0x0 0x3f scsi status 0x0 srb status 0x20 length 4 ** 8 printk messages dropped ** [ 2.123331] sd 1:0:0:4: [sde] 0-byte physical blocks ** 1081 printk messages dropped ** [ 2.147310] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 1272 printk messages dropped ** [ 2.152802] hv_storvsc: error status 0x20 ** 953 printk messages dropped ** [ 2.177996] hv_storvsc: error status 0x20 ** 1023 printk messages dropped ** [ 2.183087] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 1930 printk messages dropped ** [ 2.190078] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 1726 printk messages dropped ** [ 2.195667] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512
Quoted 1 line
From
216c0364bd42f2f5c57623dbfa8f20f28b4bb3b7Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <[email protected]>
Date: Tue, 28 Feb 2017 09:38:57 -0800
Subject: [PATCH] storvsc instrumentation
Add some debug output to Hyper-v storvsc driver to log results of SCSI requests.
--- drivers/scsi/storvsc_drv.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/scsi/storvsc_drv.c +16 -0
@@ -20,6 +20,8 @@* K. Y. Srinivasan <[email protected]> */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/wait.h> #include <linux/sched.h>
@@ -520,6 +522,8 @@ static void storvsc_host_scan(struct work_struct *work) wrk = container_of(work, struct storvsc_scan_work, work); host = wrk->host; +pr_info (" host scan initiated\n" ); +/* * Before scanning the host, first check to see if any of the * currrently known devices have been hot removed. We issue a
@@ -923,6 +927,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,void (*process_err_fn)(struct work_struct *work);bool do_work = false; +pr_info (" error status %#x\n" , +SRB_STATUS (vm_srb->srb_status)); +switch (SRB_STATUS (vm_srb->srb_status)) {case SRB_STATUS_ERROR :/*
@@ -1060,6 +1067,12 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,* We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in that case. */ +pr_info (" IO cmd %#x %#x %#x scsi status %#x srb status %#x length %u\n" , + stor_pkt->vm_srb.cdb[0 ], stor_pkt->vm_srb.cdb[1 ], + stor_pkt->vm_srb.cdb[2 ], + vstor_packet->vm_srb.scsi_status, + vstor_packet->vm_srb.srb_status, + vstor_packet->vm_srb.data_transfer_length);if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) {
@@ -1178,6 +1191,9 @@ static void storvsc_on_channel_callback(void *context)if ((request == &stor_device->init_request) || (request == &stor_device->reset_request)) { +dev_info (&device->device,"complete %s request\n" , + request == &stor_device->init_request ?"init" :"reset" ); +memcpy (&request->vstor_packet, packet, (sizeof (struct vstor_packet ) - vmscsi_size_delta));
Signature · 1 line
2.11.0
Quoted 4 lines · Stephen Hemminger
[ 1.652279] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.652297] scsi host1: scsi scan: INQUIRY result too short (5),using 36
This is definitive. We sent the Inquiry command, we got 36 bytes of payload from hyperv (correct size), but when we tried to get the length from the data buffer of the command, we found zeros where it should have been (the length is the byte at offset 4 plus 5). Wherever the inquiry data went it wasn't into the command buffer ... it's like we have some type of sg list setup error, but I can't find it.
James
Quoted 27 lines · On Tue, 28 Feb 2017 09:06:13 -0800 James Bottomley <[email protected]>…
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before eachI/O")
but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits.
Tried this, but didn't fix it either...Quoted 5 lines
Quoted 1 line
Are you using blk-mq or the legacy request code?
Stephen doesn't have MQ set in the config he posted, I'm assuming he didn't boot with scsi_mod.use_blk_mq=true. In a previous email, I asked if turning on MQ makes a difference.
OK, since we're not making much progress, Stephen, could you insert some debugging into the storvsc driver? The trace clearly shows we're getting zeros back in the buffer when we should have data from the initial scan. Firstly, does the vmbus think it's transferring any data for the INQUIRY and
READ_CAPACITYcommands (looks likestorvsc_command_completion()data_transfer_length)? If it does, there's probably an issue initialising the sg list. If it doesn't, we're probably sending bogus commands.
Quoted 2 lines
James
The following code in storvsc looks suspicious
static void storvsc_on_io_completion(struct storvsc_device *stor_device,
struct vstor_packet *vstor_packet, struct storvsc_cmd_request *request)
{
struct vstor_packet *stor_pkt;
struct hv_device *device = stor_device->device;
stor_pkt = &request->vstor_packet;
/*
* The current SCSI handling on the host side does
* not correctly handle:
* INQUIRY command with page code parameter set to 0x80
* MODE_SENSE command with cmd[2] == 0x1c
*
* Setup srb and scsi status so this won't be fatal.
* We do this so we can distinguish truly fatal failues
* (srb status == 0x4) and off-line the device in that case.
*/
if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) ||
(stor_pkt->vm_srb.cdb[0] == MODE_SENSE)) {
vstor_packet->vm_srb.scsi_status = 0;
vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
}If SCSI layer is sending inquiry about devices to do scanning then wouldn't this workaround break things? Maybe a better to fully test for the broken command.
Original commit was:
commit 4ed51a21c0f69e1379cf858fc21a9d9022bfe0e7
Author: K. Y. Srinivasan <[email protected]> Date: Sat Aug 27 11:31:26 2011 -0700
Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY and MODE_SENSE
The current VHD handler on the Windows Host does not correctly handle INQUIRY and MODE_SENSE commands with some options. Fixup srb_status in these cases since the failure is not fatal.
Quoted 68 lines · Stephen Hemminger
Quoted 33 lines · On Tue, 28 Feb 2017 09:06:13 -0800 James Bottomley <[email protected]>…
Quoted 14 lines · Jens Axboe
Quoted 13 lines · Christoph Hellwig
Quoted 10 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data beforeeach
I/O")but that is already in linux-next.
Noticed another place where memset(of the data was being done not
the extra bits.
Tried this, but didn't fix it either...Quoted 6 lines
Quoted 1 line
Are you using blk-mq or the legacy request code?
Stephen doesn't have MQ set in the config he posted, I'm assuming he
didn't boot with scsi_mod.use_blk_mq=true. In a previous email, I asked if turning on MQ makes a difference.OK, since we're not making much progress, Stephen, could you insert some debugging into the storvsc driver? The trace clearly shows we're
getting zeros back in the buffer when we should have data from the initial scan. Firstly, does the vmbus think it's transferring any data
for the INQUIRY andREAD_CAPACITYcommands (looks likestorvsc_command_completion()data_transfer_length)? If it does, there's probably an issue initialising the sg list. If it doesn't, we're probably sending bogus commands.Quoted 2 lines
James
The following code in storvsc looks suspicious
static void storvsc_on_io_completion(struct
storvsc_device*stor_device,
structvstor_packet*vstor_packet, structstorvsc_cmd_request*request){ struct vstor_packet *stor_pkt; struct hv_device *device = stor_device->device; stor_pkt = &request->vstor_packet; /* * The current SCSI handling on the host side does * not correctly handle: * INQUIRY command with page code parameter set to 0x80 * MODE_SENSE command with cmd[2] == 0x1c * * Setup srb and scsi status so this won't be fatal. * We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in that case. */ if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) || (stor_pkt->vm_srb.cdb[0] == MODE_SENSE)) { vstor_packet->vm_srb.scsi_status = 0; vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS; }
Quoted 3 lines
If SCSI layer is sending inquiry about devices to do scanning then wouldn't this workaround break things? Maybe a better to fully test for the broken command.
Let's concentrate on INQUIRY since that's the first command in the probe sequence. I think it's completing successfully because your hyperv layer says it has 36 bytes of transfer and that's the size of a successful initial INQUIRY, so the fact that the code above would break stuff if the INQUIRY failed is orthogonal to the the current problem.
can you print out some of the DMA buffer in storvsc_on_io_completion()?
I think just the stor_pkt->vm_srb.cdb[0] (to identify the command completing) and byte 5 of the buffer will tell us what we need to know.
It's going to be complex to get byte 5, you'll need to do akmap_atomic_pfn on request->payload->range.pfn_array[0] and then look at byte 5. If that's zero it means there's some problem with hyperv writing to the pfn if it's 0x24 (expected value for an initial inquiry) we've got a problem somewhere in bio completion not copying the value back.
James
Quoted 6 lines
Let's concentrate on INQUIRY since that's the first command in the probe sequence. I think it's completing successfully because your hyperv layer says it has 36 bytes of transfer and that's the size of a successful initial INQUIRY, so the fact that the code above would break stuff if the INQUIRY failed is orthogonal to the the current problem.
Right, that bodge only breaks some minor things likes scsiinfo commands.
Quoted 10 lines
can you print out some of the DMA buffer in
storvsc_on_io_completion()?I think just the stor_pkt->vm_srb.cdb[0] (to identify the command completing) and byte 5 of the buffer will tell us what we need to know.
It's going to be complex to get byte 5, you'll need to do akmap_atomic_pfnon request->payload->range.pfn_array[0] and then look at byte 5. If that's zero it means there's some problem with hyperv writing to the pfn if it's0x24(expected value for an initial inquiry) we've got a problem somewhere in bio completion not copying the value back.
Here is another boot, this time went dumpster diving as you suggested to get the request data.
drivers/scsi/storvsc_drv.c +15 -0
@@ -1059,6 +1059,21 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device, vstor_packet->vm_srb.srb_status, vstor_packet->vm_srb.data_transfer_length); +if (stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) { +struct scsi_cmnd *cmd = request->cmd; +struct scatterlist *sg =scsi_sglist (cmd); +struct page *page =sg_page (sg); +void *vaddr =kmap_atomic (page); + +print_hex_dump (KERN_INFO , +"inquiry data: " ,DUMP_PREFIX_OFFSET , +16 ,1 , + vaddr, vstor_packet->vm_srb.data_transfer_length, + false); + +kunmap_atomic (page); + } +/* * The current SCSI handling on the host side does * not correctly handle:
Which results in:
...
[ 1.225501] scsi host0: storvsc_host_t [ 1.234707] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.235517] scsi host1: storvsc_host_t [ 1.238037] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.256800] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.259430] inquiry data: 00000020: 00 00 00 00 [ 1.261431] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 1.264080] hv_storvsc: IO cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 1.267420] inquiry data: 00000000: 00 00 00 08 00 83 8f b0 b1 b2 ce cf [ 1.270759] hv_storvsc: IO cmd 0x12 0x1 0x83 scsi status 0x0 srb status 0x1 length 52 [ 1.275007] inquiry data: 00000000: 00 83 00 30 01 01 00 18 4d 53 46 54 20 20 20 20 [ 1.277988] inquiry data: 00000010: 43 77 cc 85 5f 19 c2 46 ac 48 c7 33 b9 dd 2d 2a [ 1.281096] inquiry data: 00000020: 01 03 00 10 60 02 24 80 43 77 cc 85 5f 19 c7 33 [ 1.284246] inquiry data: 00000030: b9 dd 2d 2a [ 1.306538] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.310621] inquiry data: 00000000: 00 92 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.316244] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.328151] random: fast init done [ 1.340184] inquiry data: 00000020: 00 00 00 00 [ 1.342710] scsi 1:0:0:0: CD-ROM Msft Virtual DVD-ROM 1.0 PQ: 0 ANSI: 0 [ 1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.352913] inquiry data: 00000000: 00 aa be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.356543] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.359996] inquiry data: 00000020: 00 00 00 00 [ 1.361835] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.361888] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.362307] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.362308] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.362309] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.362309] inquiry data: 00000020: 00 00 00 00 [ 1.377423] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0 [ 1.399208] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.402836] inquiry data: 00000000: 00 a3 be f1 5c 98 ff ff 00 00 00 00 00 00 00 00 [ 1.406466] inquiry data: 00000010: 00 00 00 00 00 00 00 00 c0 30 66 f9 5c 98 ff ff [ 1.409766] inquiry data: 00000020: 00 00 00 00 [ 1.412366] scsi 1:0:0:2: Direct-Access PQ: 0 ANSI: 0 [ 1.412456] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.418750] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.421624] inquiry data: 00000000: 00 92 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.424629] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.432565] inquiry data: 00000020: 00 00 00 00 [ 1.433690] scsi 1:0:0:3: Direct-Access PQ: 0 ANSI: 0 [ 1.433751] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.433753] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.433753] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.433753] inquiry data: 00000020: 00 00 00 00 [ 1.465775] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.468640] inquiry data: 00000000: 00 92 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.471717] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.474466] inquiry data: 00000020: 00 00 00 00 [ 1.476624] scsi 1:0:0:4: Direct-Access PQ: 0 ANSI: 0 [ 1.476777] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.482802] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.485801] inquiry data: 00000000: 00 92 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.493743] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.495724] inquiry data: 00000020: 00 00 00 00 [ 1.497451] scsi 1:0:0:5: Direct-Access PQ: 0 ANSI: 0 [ 1.497557] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.497558] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.497559] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.497559] inquiry data: 00000020: 00 00 00 00 [ 1.529199] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.532055] inquiry data: 00000000: 00 a3 be f1 5c 98 ff ff 00 00 00 00 00 00 00 00 [ 1.535076] inquiry data: 00000010: 00 00 00 00 00 00 00 00 c0 30 66 f9 5c 98 ff ff [ 1.537601] inquiry data: 00000020: 00 00 00 00 [ 1.539463] scsi 1:0:0:6: Direct-Access PQ: 0 ANSI: 0 [ 1.539523] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.545625] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.549238] inquiry data: 00000000: 00 00 00 00 00 00 00 00 f0 64 02 89 ff ff ff ff [ 1.558838] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.561775] inquiry data: 00000020: 00 00 00 00 [ 1.564193] scsi 1:0:0:7: Direct-Access PQ: 0 ANSI: 0 [ 1.564286] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.564287] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.564288] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.564288] inquiry data: 00000020: 00 00 00 00 [ 1.591962] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.594803] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.597613] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.600483] inquiry data: 00000020: 00 00 00 00 [ 1.602473] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.602979] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.605686] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.608562] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.612031] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.621398] inquiry data: 00000020: 00 00 00 00 [ 1.623612] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.624081] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.627608] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.627608] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.627608] inquiry data: 00000020: 00 00 00 00 [ 1.656428] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.659541] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.662333] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.665187] inquiry data: 00000020: 00 00 00 00 [ 1.666998] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.670735] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.673517] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.677515] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.677515] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.677515] inquiry data: 00000020: 00 00 00 00 [ 1.690656] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.694467] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.697643] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.700563] inquiry data: 00000020: 00 00 00 00 [ 1.702595] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.702962] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.726145] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.729919] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.733720] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.736863] inquiry data: 00000020: 00 00 00 00 [ 1.740093] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.740194] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.744076] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.744076] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.744076] inquiry data: 00000020: 00 00 00 00 [ 1.772956] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.776953] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.779680] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.782218] inquiry data: 00000020: 00 00 00 00 [ 1.784394] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.784626] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.792094] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.795247] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.797827] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.802734] inquiry data: 00000020: 00 00 00 00 [ 1.819848] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.820240] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.823843] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.823843] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.823843] inquiry data: 00000020: 00 00 00 00 [ 1.834404] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.834447] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.840676] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.843780] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.846374] inquiry data: 00000020: 00 00 00 00 [ 1.863480] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.863527] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.863552] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.863553] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.863564] inquiry data: 00000020: 00 00 00 00 [ 1.884017] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.884018] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.891512] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.903984] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.915662] inquiry data: 00000020: 00 00 00 00 [ 1.917991] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.917998] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.924404] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.927723] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.930174] inquiry data: 00000020: 00 00 00 00 [ 1.932514] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.932508] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.940019] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.956298] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.962475] inquiry data: 00000020: 00 00 00 00 [ 1.965476] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.968215] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.971735] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.973634] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.975698] inquiry data: 00000020: 00 00 00 00 [ 1.977125] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.979795] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.981025] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.982616] inquiry data: 00000020: 00 00 00 00 [ 1.984502] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 1.984717] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.008517] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.011539] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.013973] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.016679] inquiry data: 00000020: 00 00 00 00 [ 2.018610] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.018823] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.024671] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.027955] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.030679] inquiry data: 00000020: 00 00 00 00 [ 2.033142] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.042496] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.056213] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.059225] inquiry data: 00000020: 00 00 00 00 [ 2.060987] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.061371] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.086089] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.088962] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.091849] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.094272] inquiry data: 00000020: 00 00 00 00 [ 2.096274] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.096535] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.100269] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.100269] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.100269] inquiry data: 00000020: 00 00 00 00 [ 2.109952] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.112806] inquiry data: 00000000: 00 b3 be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.121465] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.124358] inquiry data: 00000020: 00 00 00 00 [ 2.126483] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.126840] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.134173] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.136972] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.140007] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.142548] inquiry data: 00000020: 00 00 00 00 [ 2.152163] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.165698] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.169146] inquiry data: 00000000: 00 2d 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 2.169694] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 2.169694] inquiry data: 00000020: 00 00 00 00 [ 2.181106] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 4096 [ 2.184852] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x1 length 0 [ 2.184927] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 2.185119] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x2 srb status 0x84 length 0 [ 2.185170] hv_storvsc: IO cmd 0x1a 0x0 0x2a scsi status 0x2 srb status 0x6 length 128 [ 2.185189] sr 1:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy [ 2.185190] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 2.185427] hv_storvsc: IO cmd 0x4a 0x1 0x0 scsi status 0x0 srb status 0x1 length 8 [ 2.185471] sr 1:0:0:0: Attached scsi generic sg1 type 5 [ 2.185622] hv_storvsc: IO cmd 0x4a 0x1 0x0 scsi status 0x0 srb status 0x1 length 8 [ 2.185666] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.185673] sd 1:0:0:1: Attached scsi generic sg2 type 0 [ 2.185722] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.185816] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x2 srb status 0x84 length 0 [ 2.185851] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 2.185853] sd 1:0:0:1: [sdb] 1 512-byte logical blocks: (512 B/512 B) [ 2.185854] sd 1:0:0:1: [sdb] 0-byte physical blocks [ 2.185860] hv_storvsc: IO cmd 0x1a 0x0 0x3f scsi status 0x0 srb status 0x20 length 4 [ 2.185865] sd 1:0:0:2: Attached scsi generic sg3 type 0 [ 2.185979] sd 1:0:0:1: [sdb] Write Protect is off [ 2.186030] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x2 srb status 0x84 length 0 [ 2.186038] hv_storvsc: IO cmd 0x1a 0x0 0x8 scsi status 0x0 srb status 0x20 length 4 [ 2.186247] sd 1:0:0:1: [sdb] Asking for cache data failed [ 2.186247] sd 1:0:0:1: [sdb] Assuming drive cache: write through [ 2.186603] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 4 [ 2.186637] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.186686] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 2.186665] hv_storvsc: IO cmd 0x1a 0x0 0x3f scsi status 0x0 srb status 0x20 length 4 [ 2.186685] hv_storvsc: IO cmd 0x1a 0x0 0x8 scsi status 0x0 srb status 0x20 length 4 [ 2.186771] sd 1:0:0:3: Attached scsi generic sg4 type 0 [ 2.186849] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.186861] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.186965] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 0 [ 2.187002] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 [ 2.186990] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 [ 2.186999] sd 1:0:0:4: Attached scsi generic sg5 type 0 [ 2.187023] sd 1:0:0:3: [sdd] Sector size 0 reported, assuming 512. [ 2.187025] sd 1:0:0:3: [sdd] 1 512-byte logical blocks: (512 B/512 B) [ 2.187026] sd 1:0:0:3: [sdd] 0-byte physical blocks [ 2.187073] hv_storvsc: IO cmd 0x1a 0x0 0x3f scsi status 0x0 srb status 0x20 length 4 [ 2.187054] sd 1:0:0:3: [sdd] Write Protect is off [ 2.187106] hv_storvsc: IO cmd 0x1a 0x0 0x8 scsi status 0x0 srb status 0x20 length 4 [ 2.187225] sd 1:0:0:3: [sdd] Asking for cache data failed [ 2.187226] sd 1:0:0:3: [sdd] Assuming drive cache: write through [ 2.187267] sd 1:0:0:5: Attached scsi generic sg6 type 0 [ 2.187579] hv_storvsc: IO cmd 0x4a 0x1 0x0 scsi status 0x0 srb status 0x1 length 8 [ 2.187613] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x2 srb status 0x84 length 0 [ 2.187644] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.187645] inquiry data: 00000000: 05 80 00 02 1f 00 00 00 4d 73 66 74 20 20 20 20 [ 2.187646] inquiry data: 00000010: 56 69 72 74 75 61 6c 20 44 56 44 2d 52 4f 4d 20 [ 2.187646] inquiry data: 00000020: 31 2e 30 20 [ 2.187751] sd 1:0:0:2: [sdc] Sector size 0 reported, assuming 512. [ 2.187695] sd 1:0:0:6: Attached scsi generic sg7 type 0 [ 2.187754] sd 1:0:0:2: [sdc] 1 512-byte logical blocks: (512 B/512 B) [ 2.187762] sd 1:0:0:2: [sdc] 0-byte physical blocks [ 2.187786] hv_storvsc: IO cmd 0x4a 0x1 0x0 scsi status 0x0 srb status 0x1 length 8 [ 2.187786] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x0 srb status 0x20 length 4 [ 2.187746] hv_storvsc: IO cmd 0x1a 0x0 0x3f scsi status 0x0 srb status 0x20 length 4 [ 2.187790] hv_storvsc: IO cmd 0x0 0x0 0x0 scsi status 0x2 srb status 0x84 length 0 [ 2.187841] sd 1:0:0:2: [sdc] Write Protect is off [ 2.187796] hv_storvsc: IO cmd 0x1a 0x0 0x8 scsi status 0x0 srb status 0x20 length 4 [ 2.187799] hv_storvsc: IO cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 6 [ 2.187800] inquiry data: 00000000: 05 00 00 02 00 83 [ 2.187893] sd 1:0:0:2: [sdc] Asking for cache data failed [ 2.187894] sd 1:0:0:2: [sdc] Assuming drive cache: write through [ 2.188016] hv_storvsc: IO cmd 0x25 0x0 0x0 scsi status 0x0 srb status 0x20 length 8 ** 812 printk messages dropped ** [ 2.211818] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 881 printk messages dropped ** [ 2.217316] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 671 printk messages dropped ** [ 2.222495] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 136 printk messages dropped ** [ 2.223813] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 477 printk messages dropped ** [ 2.227906] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 768 printk messages dropped ** [ 2.232439] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 length 512 ** 389 printk messages dropped ** [ 2.234770] hv_storvsc: IO cmd 0x28 0x0 0x0 scsi status 0x0 srb status 0x20 lengt
Quoted 12 lines · Stephen Hemminger
[ 1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.352913] inquiry data: 00000000: 00 aa be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.356543] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.359996] inquiry data: 00000020: 00 00 00 00 [ 1.361835] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.361888] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.362307] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb
Quoted 8 lines
status
0x1length 36[ 1.362308] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.362309] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.362309] inquiry data: 00000020: 00 00 00 00 [ 1.377423] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0
Well, this pinpoints the fault to the block uncopy, I think. The Inquiry data is clearly correct in the page frame, so it's not getting copied to the scsi_execute() buffer for some reason.
James
Quoted 22 lines · On Tue, 28 Feb 2017 22:20:58 -0800 James Bottomley <[email protected]>…
Quoted 12 lines · Stephen Hemminger
[ 1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.352913] inquiry data: 00000000: 00 aa be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.356543] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.359996] inquiry data: 00000020: 00 00 00 00 [ 1.361835] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.361888] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.362307] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srbQuoted 8 lines
status
0x1length 36[ 1.362308] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.362309] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.362309] inquiry data: 00000020: 00 00 00 00 [ 1.377423] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0
Quoted 6 lines
Well, this pinpoints the fault to the block uncopy, I think. The Inquiry data is clearly correct in the page frame, so it's not getting copied to the
scsi_execute()buffer for some reason.James
Let me know, I can run another test and dump more data.
Quoted 1 line · Stephen Hemminger
Let me know, I can run another test and dump more data.
Could it be that we keep the old sense buffer values around because my commit change the way how sense buffers are handled. A while ago I suggested this patch to fix it, so maybe you can try it:
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4
Quoted 8 lines · On Wed, 1 Mar 2017 16:50:57 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 1 line · Stephen Hemminger
Let me know, I can run another test and dump more data.
Could it be that we keep the old sense buffer values around because my commit change the way how sense buffers are handled. A while ago I suggested this patch to fix it, so maybe you can try it:
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4
It appears that is already in the code I am testing in linux-next...
bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len,
struct scsi_sense_hdr *sshdr)
{
memset(sshdr, 0, sizeof(struct scsi_sense_hdr));
if (!sense_buffer || !sb_len)
return false;
sshdr->response_code = (sense_buffer[0] & 0x7f);
if (!scsi_sense_valid(sshdr))Quoted 3 lines · Stephen Hemminger
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4It appears that is already in the code I am testing in linux-next...
It's in -next now, but it wasn't at the time you reported the bug.
And it would sortof explain the bug if the INQUIRY data is correct in the scatterlist, but we ignore it, given that scsi_probe_lun ignores the result based on sense data.
Can you check what happens with the horrible hack below:
drivers/scsi/scsi_scan.c +7 -1
@@ -603,7 +603,7 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result,SCSI_LOG_SCAN_BUS (3 ,sdev_printk (KERN_INFO , sdev,"scsi scan: INQUIRY %s with code 0x%x\n" , result ?"failed" :"successful" , result)); - +#if 0 if (result) {/* * not-ready to ready transition [asc/ascq=0x28/0x0]
@@ -628,6 +628,12 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result,if (resid == try_inquiry_len) continue; } +#else +if (result) { +printk_ratelimited ("got result %d:\n" , result); + result =0 ; + } +#endif break ; }
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Stephen Hemminger
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4It appears that is already in the code I am testing in linux-next...
Quoted 7 lines
It's in -next now, but it wasn't at the time you reported the bug.
And it would sortof explain the bug if the INQUIRY data is correct in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the case.
Now the other interesting thing is the memset in __scsi_exectute, which looks very suspicious. Try the following please:
drivers/scsi/scsi_lib.c +2 -1
@@ -253,7 +253,8 @@ static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) -memset (buffer + (bufflen - rq->resid_len),0 , rq->resid_len); +// memset(buffer + (bufflen - rq->resid_len), 0, rq->resid_len); +printk_ratelimited ("%s: got resid %d\n" , __func__, rq->resid_len);if (resid) *resid = rq->resid_len;
Quoted 24 lines · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Stephen Hemminger
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4It appears that is already in the code I am testing in linux-next...
Quoted 7 lines
It's in -next now, but it wasn't at the time you reported the bug.
And it would sortof explain the bug if the INQUIRY data is correct in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the case.
Now the other interesting thing is the memset in
__scsi_exectute, which looks very suspicious. Try the following please:drivers/scsi/scsi_lib.c +0
-0
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, · line 260
Quoted 9 lines
drivers/scsi/scsi_lib.c +2
-1@@ -253,7 +253,8 @@ static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) -memset (buffer + (bufflen - rq->resid_len),0 , rq->resid_len); +// memset(buffer + (bufflen - rq->resid_len), 0, rq->resid_len); +printk_ratelimited ("%s: got resid %d\n" , __func__, rq->resid_len);if (resid) *resid = rq->resid_len;
Still fails but does print resid on some of the later INQUIRY commands (not the initial one).
[ 1.222728] scsi host0: storvsc_host_t [ 1.230120] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.235358] scsi host1: storvsc_host_t [ 1.238629] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1ef2 [ 1.241127] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xf00 length 36 [ 1.242422] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.242423] hv_storvsc: payload size 288 count 1 offset 3328 len 36 pfn 0x1f112b [ 1.242425] hv_storvsc: sg 0: phys 0x1f112b000 virt ffff905db112b000 offset 0xd00 length 36 [ 1.242427] data: 00000000: 05 80 00 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 1.242427] data: 00000010: 56 69 72 74 75 61 6c 20 44 56 44 2d 52 4f 4d 20 Virtual DVD-ROM [ 1.242428] data: 00000020: 31 2e 30 20 1.0 [ 1.242456] scsi 1:0:0:0: CD-ROM Msft Virtual DVD-ROM 1.0 PQ: 0 ANSI: 0 [ 1.242705] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.242706] hv_storvsc: payload size 288 count 1 offset 2816 len 36 pfn 0x1f112b [ 1.242707] hv_storvsc: sg 0: phys 0x1f112b000 virt ffff905db112b000 offset 0xb00 length 36 [ 1.242708] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.242709] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.242709] data: 00000020: 00 00 00 00 .... [ 1.242730] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.242732] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0 [ 1.242982] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.242983] hv_storvsc: payload size 288 count 1 offset 768 len 36 pfn 0x1f1129 [ 1.242984] hv_storvsc: sg 0: phys 0x1f1129000 virt ffff905db1129000 offset 0x300 length 36 [ 1.242985] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.242986] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.242986] data: 00000020: 00 00 00 00 .... [ 1.243003] scsi 1:0:0:2: Direct-Access PQ: 0 ANSI: 0 [ 1.244180] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.244181] hv_storvsc: payload size 288 count 1 offset 2048 len 36 pfn 0x1f1128 [ 1.244181] hv_storvsc: sg 0: phys 0x1f1128000 virt ffff905db1128000 offset 0x800 length 36 [ 1.244182] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.244183] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.244183] data: 00000020: 00 00 00 00 .... [ 1.244202] scsi 1:0:0:3: Direct-Access PQ: 0 ANSI: 0 [ 1.244463] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.244463] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1129 [ 1.244464] hv_storvsc: sg 0: phys 0x1f1129000 virt ffff905db1129000 offset 0xa00 length 36 [ 1.244465] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.244465] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.244466] data: 00000020: 00 00 00 00 .... [ 1.244481] scsi 1:0:0:4: Direct-Access PQ: 0 ANSI: 0 [ 1.247017] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.247018] hv_storvsc: payload size 288 count 1 offset 256 len 36 pfn 0x1f112b [ 1.247019] hv_storvsc: sg 0: phys 0x1f112b000 virt ffff905db112b000 offset 0x100 length 36 [ 1.247021] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.247021] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.247021] data: 00000020: 00 00 00 00 .... [ 1.247051] scsi 1:0:0:5: Direct-Access PQ: 0 ANSI: 0 [ 1.247359] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.247372] hv_storvsc: payload size 288 count 1 offset 768 len 36 pfn 0x1f112a [ 1.247379] hv_storvsc: sg 0: phys 0x1f112a000 virt ffff905db112a000 offset 0x300 length 36 [ 1.247391] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.247395] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.247402] data: 00000020: 00 00 00 00 .... [ 1.247429] scsi 1:0:0:6: Direct-Access PQ: 0 ANSI: 0 [ 1.247758] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.247758] hv_storvsc: payload size 288 count 1 offset 1792 len 36 pfn 0x1f1129 [ 1.247768] hv_storvsc: sg 0: phys 0x1f1129000 virt ffff905db1129000 offset 0x700 length 36 [ 1.247780] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.247781] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.247785] data: 00000020: 00 00 00 00 .... [ 1.247816] scsi 1:0:0:7: Direct-Access PQ: 0 ANSI: 0 [ 1.248097] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.248107] hv_storvsc: payload size 288 count 1 offset 2048 len 36 pfn 0x1f112a [ 1.248107] hv_storvsc: sg 0: phys 0x1f112a000 virt ffff905db112a000 offset 0x800 length 36 [ 1.248120] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 1.248120] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 1.248130] data: 00000020: 31 2e 30 20 1.0 [ 1.284189] random: fast init done [ 1.594553] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 ........Msft [ 1.598356] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 1.602223] data: 00000020: 31 2e 30 20 1.0 [ 1.605926] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 1.609761] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 1.610084] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.610085] hv_storvsc: payload size 288 count 1 offset 2816 len 36 pfn 0x1f1277 [ 1.610086] hv_storvsc: sg 0: phys 0x1f1277000 virt ffff905db1277000 offset 0xb00 length 36 [ 1.610088] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 1.610088] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 1.610089] data: 00000020: 31 2e 30 20 1.0 [ 1.661738] hv_storvsc: payload size 288 count 1 offset 0 len 255 pfn 0x1e3ba3 [ 1.665438] hv_storvsc: sg 0: phys 0x1e3ba3000 virt ffff905da3ba3000 offset 0x0 length 255 [ 1.682175] data: 00000000: 00 00 00 08 00 83 8f b0 b1 b2 ce cf 00 00 00 00 ................ [ 1.683345] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.684363] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.692286] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.700453] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.708273] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.722436] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.739042] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.743325] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.747207] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.749977] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.754361] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.758723] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.776717] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.779593] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.783032] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... [ 1.787586] scsi_execute got resid 243 [ 1.790063] hv_storvsc: INQUIRY cmd 0x12 0x1 0x83 scsi status 0x0 srb status 0x1 length 52 [ 1.790333] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.790334] hv_storvsc: payload size 288 count 1 offset 2816 len 36 pfn 0x1f1277 [ 1.790336] hv_storvsc: sg 0: phys 0x1f1277000 virt ffff905db1277000 offset 0xb00 length 36 [ 1.790337] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 1.790338] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 1.790338] data: 00000020: 31 2e 30 20 1.0 [ 1.841715] hv_storvsc: payload size 288 count 1 offset 0 len 255 pfn 0x1e3ba4 [ 1.845524] hv_storvsc: sg 0: phys 0x1e3ba4000 virt ffff905da3ba4000 offset 0x0 length 255 [ 1.849966] data: 00000000: 00 83 00 30 01 01 00 18 4d 53 46 54 20 20 20 20 ...0....MSFT [ 1.854428] data: 00000010: 43 77 cc 85 5f 19 c2 46 ac 48 c7 33 b9 dd 2d 2a Cw.._..F.H.3..-* [ 1.857536] data: 00000020: 01 03 00 10 60 02 24 80 43 77 cc 85 5f 19 c7 33 ....`.$.Cw.._..3 [ 1.861291] data: 00000030: b9 dd 2d 2a 00 00 00 00 00 00 00 00 00 00 00 00 ..-*............ [ 1.865966] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.870546] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.901408] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.905671] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.910371] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.915072] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.935337] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.937999] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.941651] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.946651] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.951226] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.956304] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... [ 1.961435] scsi_execute got resid 203 [ 1.964343] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.981642] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 1.986109] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 1.991274] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 1.999081] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.004044] data: 00000020: 31 2e 30 20 1.0 [ 2.009208] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.024655] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.028036] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.043219] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.049037] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.054207] data: 00000020: 31 2e 30 20 1.0 [ 2.065676] scsi_execute got resid 4080 [ 2.069949] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.069959] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.069982] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.069983] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.069983] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.069988] data: 00000020: 31 2e 30 20 1.0 [ 2.102616] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.106612] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.106612] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.106612] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.106612] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.106612] data: 00000020: 31 2e 30 20 1.0 [ 2.141413] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.146437] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.151053] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.167892] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.172929] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.178172] data: 00000020: 31 2e 30 20 1.0 [ 2.183231] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.187227] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.187227] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.187227] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.187227] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.187227] data: 00000020: 31 2e 30 20 1.0 [ 2.225692] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.230942] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.251916] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.257345] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.262948] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.265758] data: 00000020: 31 2e 30 20 1.0 [ 2.271111] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.276522] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.307899] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.312390] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.318075] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.323732] data: 00000020: 31 2e 30 20 1.0 [ 2.341677] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.344063] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.348636] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.354366] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.360141] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.365879] data: 00000020: 31 2e 30 20 1.0 [ 2.371340] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.388088] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.393104] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.398875] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.405109] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.410898] data: 00000020: 31 2e 30 20 1.0 [ 2.416483] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.433832] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.441820] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.447883] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.454422] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.460592] data: 00000020: 31 2e 30 20 1.0 [ 2.469609] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.475498] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.480879] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.511232] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.512355] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.516218] data: 00000020: 31 2e 30 20 1.0 [ 2.522068] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.533055] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.547864] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.548934] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.550104] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.554974] data: 00000020: 31 2e 30 20 1.0 [ 2.561050] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.567070] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.572454] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.576416] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.580698] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.586924] data: 00000020: 31 2e 30 20 1.0 [ 2.610426] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.616682] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.622430] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.628825] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.635315] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.652806] data: 00000020: 31 2e 30 20 1.0 [ 2.670313] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.676530] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.682350] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.700658] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.708184] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.713235] data: 00000020: 31 2e 30 20 1.0 [ 2.718336] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.724701] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.730493] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.746543] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.751031] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.757802] data: 00000020: 31 2e 30 20 1.0 [ 2.764585] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.764859] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.764860] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.764861] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.764863] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.764863] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.764864] data: 00000020: 31 2e 30 20 1.0 [ 2.816336] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.822130] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.839623] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.850323] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.857409] data: 00000020: 31 2e 30 20 1.0 [ 2.864086] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.864232] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.864233] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.864235] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 2.864236] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.864237] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.864237] data: 00000020: 31 2e 30 20 1.0 [ 2.916881] hv_storvsc: payload size 288 count 1 offset 3840 len 36 pfn 0x1f1275 [ 2.937138] hv_storvsc: sg 0: phys 0x1f1275000 virt ffff905db1275000 offset 0xf00 length 36 [ 2.944036] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 2.964796] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 2.974043] data: 00000020: 31 2e 30 20 1.0 [ 2.979489] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 2.986125] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 2.992116] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 3.002950] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.011839] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 3.017573] data: 00000020: 31 2e 30 20 1.0 [ 3.024620] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 3.032025] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 3.038325] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 3.055645] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.062027] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 3.069190] data: 00000020: 31 2e 30 20 1.0 [ 3.088776] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 3.093542] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 3.099750] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 3.107258] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.114461] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 3.130818] data: 00000020: 31 2e 30 20 1.0 [ 3.139847] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 3.146845] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 3.166667] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 3.173167] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.178052] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 3.185482] data: 00000020: 31 2e 30 20 1.0 [ 3.192503] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 3.202257] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 3.213984] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 3.222230] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.231055] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 3.232606] data: 00000020: 31 2e 30 20 1.0 [ 3.234584] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 3.243386] hv_storvsc: payload size 288 count 1 offset 2560 len 36 pfn 0x1f1ef2 [ 3.275807] hv_storvsc: sg 0: phys 0x1f1ef2000 virt ffff905db1ef2000 offset 0xa00 length 36 [ 3.280650] data: 00000000: 7f 00 05 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.288369] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 3.311133] data: 00000020: 31 2e 30 20 1.0 [ 3.313946] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 3.314755] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 8 [ 3.314940] sr 1:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy [ 3.314941] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 3.323114] hv_storvsc: payload size 288 count 1 offset 1584 len 8 pfn 0x1f2687 [ 3.327097] hv_storvsc: sg 0: phys 0x1f2687000 virt ffff905db2687000 offset 0x630 length 8 [ 3.337525] data: 00000000: 00 00 00 08 00 83 8f b0 ........ [ 3.341499] hv_storvsc: INQUIRY cmd 0x12 0x1 0xb2 scsi status 0x0 srb status 0x1 length 8 [ 3.342988] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 3.342989] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1e3c1e [ 3.342990] hv_storvsc: sg 0: phys 0x1e3c1e000 virt ffff905da3c1e000 offset 0x0 length 254 [ 3.342992] data: 00000000: 05 80 00 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.342993] data: 00000010: 56 69 72 74 75 61 6c 20 44 56 44 2d 52 4f 4d 20 Virtual DVD-ROM [ 3.342993] data: 00000020: 31 2e 30 20 00 00 00 00 00 00 00 00 00 00 00 00 1.0 ............ [ 3.342994] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342994] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342995] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342995] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342996] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342996] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342997] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342997] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342998] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342999] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.342999] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343000] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343000] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.343180] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 6 [ 3.343181] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1e3c1f [ 3.343181] hv_storvsc: sg 0: phys 0x1e3c1f000 virt ffff905da3c1f000 offset 0x0 length 254 [ 3.343182] data: 00000000: 05 00 00 02 00 83 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343182] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343183] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343183] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343183] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343184] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343184] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343184] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343185] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343185] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343186] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343186] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343186] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343187] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343187] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343188] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.343225] hv_storvsc: INQUIRY cmd 0x12 0x1 0x80 scsi status 0x2 srb status 0x84 length 0 [ 3.343225] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1e3c1f [ 3.343226] hv_storvsc: sg 0: phys 0x1e3c1f000 virt ffff905da3c1f000 offset 0x0 length 254 [ 3.343226] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343227] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343227] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343228] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343228] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343228] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343229] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343229] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343229] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343230] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343230] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343231] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343231] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343231] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343232] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343232] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.343263] hv_storvsc: INQUIRY cmd 0x12 0x1 0x83 scsi status 0x0 srb status 0x1 length 32 [ 3.343264] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1e3c1f [ 3.343264] hv_storvsc: sg 0: phys 0x1e3c1f000 virt ffff905da3c1f000 offset 0x0 length 254 [ 3.343265] data: 00000000: 05 83 00 1c 01 01 00 18 4d 53 46 54 20 20 20 20 ........MSFT [ 3.343265] data: 00000010: 73 05 e3 43 77 03 54 46 94 95 7d 7c ed 62 4a 7d s..Cw.TF..}|.bJ} [ 3.343265] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343266] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343266] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343266] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343267] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343267] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343268] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343268] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343268] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343269] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343269] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343270] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343270] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.343270] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.344623] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 3.344624] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1f064f [ 3.344625] hv_storvsc: sg 0: phys 0x1f064f000 virt ffff905db064f000 offset 0x0 length 254 [ 3.344626] data: 00000000: 05 80 00 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 3.344627] data: 00000010: 56 69 72 74 75 61 6c 20 44 56 44 2d 52 4f 4d 20 Virtual DVD-ROM [ 3.344627] data: 00000020: 31 2e 30 20 00 00 00 00 00 00 00 00 00 00 00 00 1.0 ............ [ 3.344628] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344628] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344628] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344629] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344629] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344629] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344630] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344630] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344631] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344631] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344631] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344632] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344632] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.344807] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 6 [ 3.344808] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1f064e [ 3.344809] hv_storvsc: sg 0: phys 0x1f064e000 virt ffff905db064e000 offset 0x0 length 254 [ 3.344810] data: 00000000: 05 00 00 02 00 83 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344810] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344811] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344811] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344812] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344812] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344812] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344813] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344814] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344814] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344815] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344816] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344816] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344817] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344817] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344818] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.344848] hv_storvsc: INQUIRY cmd 0x12 0x1 0x80 scsi status 0x2 srb status 0x84 length 0 [ 3.344849] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1f064e [ 3.344849] hv_storvsc: sg 0: phys 0x1f064e000 virt ffff905db064e000 offset 0x0 length 254 [ 3.344850] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344850] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344851] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344851] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344851] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344852] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344852] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344853] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344853] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344853] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344854] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344854] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344855] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344855] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344855] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344856] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.344886] hv_storvsc: INQUIRY cmd 0x12 0x1 0x83 scsi status 0x0 srb status 0x1 length 32 [ 3.344886] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1f064e [ 3.344887] hv_storvsc: sg 0: phys 0x1f064e000 virt ffff905db064e000 offset 0x0 length 254 [ 3.344887] data: 00000000: 05 83 00 1c 01 01 00 18 4d 53 46 54 20 20 20 20 ........MSFT [ 3.344888] data: 00000010: 73 05 e3 43 77 03 54 46 94 95 7d 7c ed 62 4a 7d s..Cw.TF..}|.bJ} [ 3.344888] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344889] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344890] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344890] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344891] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344891] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344892] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344893] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344893] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344894] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344894] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344895] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344896] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 3.344896] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 3.356067] sr 1:0:0:0: Attached scsi generic sg1 type 5 [ 3.356223] sd 1:0:0:1: Attached scsi generic sg2 type 0 [ 3.356263] scsi_execute got resid 8 [ 3.356265] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 3.356268] sd 1:0:0:1: [sdb] 1 512-byte logical blocks: (512 B/512 B) [ 3.356269] sd 1:0:0:1: [sdb] 0-byte physical blocks [ 3.356294] sd 1:0:0:1: [sdb] Write Protect is off [ 3.356317] sd 1:0:0:2: Attached scsi generic sg3 type 0 [ 3.356325] sd 1:0:0:1: [sdb] Asking for cache data failed [ 3.356326] sd 1:0:0:1: [sdb] Assuming drive cache: write through [ 3.356755] scsi_execute got resid 8 [ 3.356757] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 3.357078] sd 1:0:0:3: Attached scsi generic sg4 type 0 [ 3.357729] sd 1:0:0:4: Attached scsi generic sg5 type 0 [ 3.357968] sd 1:0:0:5: Attached scsi generic sg6 type 0 [ 3.358146] sd 1:0:0:6: Attached scsi generic sg7 type 0 [ 3.358470] sd 1:0:0:7: Attached scsi generic sg8 type 0 [ 3.358405] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358407] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358416] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358416] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358420] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358421] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358422] ldm_validate_partition_table(): Disk read failed. [ 3.358440] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358441] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358444] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358445] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358448] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358448] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358451] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358452] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358453] Dev sdb: unable to read RDB block 0 [ 3.358455] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358456] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358459] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358459] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358463] blk_update_request: I/O error, dev sdb, sector 0 [ 3.358463] Buffer I/O error on dev sdb, logical block 0, async page read [ 3.358467] sdb: unable to read partition table [ 3.358470] sdb: partition table beyond EOD, enabling native capacity [ 3.358668] scsi_execute got resid 8 [ 3.358668] sd 1:0:0:2: [sdc] Sector size 0 reported, assuming 512. [ 3.358668] sd 1:0:0:2: [sdc] 1 512-byte logical blocks: (512 B/512 B) [ 3.358668] sd 1:0:0:2: [sdc] 0-byte physical blocks [ 3.358668] sd 1:0:0:2: [sdc] Write Protect is off [ 3.358668] sd 1:0:0:2: [sdc] Asking for cache data failed [ 3.358668] sd 1:0:0:2: [sdc] Assuming drive cache: write through [ 3.358737] scsi_execute got resid 8 [ 3.358738] sd 1:0:0:2: [sdc] Sector size 0 reported, assuming 512. [ 3.359714] scsi_execute got resid 8 [ 3.359717] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 3.359898] ldm_validate_partition_table(): Disk read failed. [ 3.359906] Dev sdb: unable to read RDB block 0 [ 3.359913] sdb: unable to read partition table [ 3.359915] sdb: partition table beyond EOD, truncated [ 3.360297] scsi_execute got resid 8 [ 3.360300] sd 1:0:0:1: [sdb] Sector size 0 reported, assuming 512. [ 3.360368] sd 1:0:0:1: [sdb] Attached SCSI disk [ 3.360454] scsi_execute got resid 8 [ 3.360456] sd 1:0:0:3: [sdd] Sector size 0 reported, assuming 512. [ 3.360458] sd 1:0:0:3: [sdd] 1 512-byte logical blocks: (512 B/512 B) [ 3.360459] sd 1:0:0:3: [sdd] 0-byte physical blocks [ 3.360509] sd 1:0:0:3: [sdd] Write Protect is off [ 3.360542] sd 1:0:0:3: [sdd] Asking for cache data failed [ 3.360550] sd 1:0:0:3: [sdd] Assuming drive cache: write through [ 3.360759] sd 1:0:0:3: [sdd] Sector size 0 reported, assuming 512. [ 3.447345] random: crng init done [ 4.116192] sd 1:0:0:4: [sde] Sector size 0 reported, assuming 512. [ 4.116195] sd 1:0:0:4: [sde] 1 512-byte logical blocks: (512 B/512 B) [ 4.116197] sd 1:0:0:4: [sde] 0-byte physical blocks [ 4.116234] sd 1:0:0:4: [sde] Write Protect is off [ 4.116293] sd 1:0:0:4: [sde] Asking for cache data failed [ 4.116294] sd 1:0:0:4: [sde] Assuming drive cache: write through [ 4.116298] sd 1:0:0:5: [sdf] Sector size 0 reported, assuming 512. [ 4.116301] sd 1:0:0:5: [sdf] 1 512-byte logical blocks: (512 B/512 B) [ 4.116302] sd 1:0:0:5: [sdf] 0-byte physical blocks [ 4.116330] sd 1:0:0:6: [sdg] Sector size 0 reported, assuming 512. [ 4.116332] sd 1:0:0:6: [sdg] 1 512-byte logical blocks: (512 B/512 B) [ 4.116332] sd 1:0:0:6: [sdg] 0-byte physical blocks [ 4.116339] sd 1:0:0:5: [sdf] Write Protect is off [ 4.116378] sd 1:0:0:5: [sdf] Asking for cache data failed [ 4.116379] sd 1:0:0:5: [sdf] Assuming drive cache: write through [ 4.116433] sd 1:0:0:7: [sdh] Sector size 0 reported, assuming 512. [ 4.116435] sd 1:0:0:7: [sdh] 1 512-byte logical blocks: (512 B/512 B) [ 4.116436] sd 1:0:0:7: [sdh] 0-byte physical blocks [ 4.116467] sd 1:0:0:4: [sde] Sector size 0 reported, assuming 512. [ 4.116564] sd 1:0:0:7: [sdh] Write Protect is off [ 4.116609] sd 1:0:0:5: [sdf] Sector size 0 reported, assuming 512. [ 4.116636] sd 1:0:0:6: [sdg] Write Protect is off [ 4.116630] sd 1:0:0:7: [sdh] Asking for cache data failed [ 4.116631] sd 1:0:0:7: [sdh] Assuming drive cache: write through [ 4.116701] sd 1:0:0:6: [sdg] Asking for cache data failed [ 4.116702] sd 1:0:0:6: [sdg] Assuming drive cache: write through [ 4.116887] sd 1:0:0:7: [sdh] Sector size 0 reported, assuming 512. [ 4.116949] sd 1:0:0:6: [sdg] Sector size 0 reported, assuming 512. [ 5.304128] hv_storvsc: payload size 288 count 1 offset 1584 len 8 pfn 0x1f2687 [ 5.306669] hv_storvsc: sg 0: phys 0x1f2687000 virt ffff905db2687000 offset 0x630 length 8 [ 5.309498] data: 00000000: 00 b2 00 04 01 80 02 00 ........ [ 5.312871] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 5.315883] hv_storvsc: payload size 288 count 1 offset 2496 len 64 pfn 0x1f98c9 [ 5.318004] hv_storvsc: sg 0: phys 0x1f98c9000 virt ffff905db98c9000 offset 0x9c0 length 64 [ 5.320694] data: 00000000: 00 00 00 08 00 83 8f b0 b1 b2 ce cf 00 00 ad de ................ [ 5.323745] data: 00000010: 00 02 00 00 00 00 ad de 01 00 00 00 00 00 00 00 ................ [ 5.341373] data: 00000020: 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 ................ [ 5.344177] data: 00000030: 00 00 00 00 00 00 00 00 d5 0b 50 b2 ff ff ff ff ..........P..... [ 5.347673] hv_storvsc: INQUIRY cmd 0x12 0x1 0xb0 scsi status 0x0 srb status 0x1 length 64 [ 5.350101] hv_storvsc: payload size 288 count 1 offset 2496 len 64 pfn 0x1f98c9 [ 5.352539] hv_storvsc: sg 0: phys 0x1f98c9000 virt ffff905db98c9000 offset 0x9c0 length 64 [ 5.355472] data: 00000000: 00 b0 00 3c 00 01 00 00 00 00 00 00 00 00 00 00 ...<............ [ 5.358303] data: 00000010: 00 00 00 00 ff ff ff ff 00 00 10 00 00 01 00 00 ................ [ 5.361471] data: 00000020: 80 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 ..........@..... [ 5.364390] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 5.367553] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 5.369817] hv_storvsc: payload size 288 count 1 offset 2496 len 64 pfn 0x1f98c9 [ 5.375006] hv_storvsc: sg 0: phys 0x1f98c9000 virt ffff905db98c9000 offset 0x9c0 length 64 [ 5.377634] data: 00000000: 00 00 00 08 00 83 8f b0 b1 b2 ce cf 00 00 00 00 ................ [ 5.380280] data: 00000010: 00 00 00 00 ff ff ff ff 00 00 10 00 00 01 00 00 ................ [ 5.383063] data: 00000020: 80 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 ..........@..... [ 5.385518] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 5.397950] hv_storvsc: INQUIRY cmd 0x12 0x1 0xb1 scsi status 0x0 srb status 0x1 length 64 [ 5.421755] hv_storvsc: payload size 288 count 1 offset 2496 len 64 pfn 0x1f98c9 [ 5.424121] hv_storvsc: sg 0: phys 0x1f98c9000 virt ffff905db98c9000 offset 0x9c0 length 64 [ 5.427212] data: 00000000: 00 b1 00 3c 00 00 00 00 00 00 00 00 00 00 00 00 ...<............ [ 5.429834] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 5.432738] data: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 5.449282] data: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 5.461140] sd 0:0:0:0: [sda] 266338304 512-byte logical blocks: (136 GB/127 GiB) [ 5.464335] sd 0:0:0:0: [sda] 4096-byte physical blocks [ 5.467012] sd 0:0:0:0: [sda] Write Protect is off [ 5.468759] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Quoted 34 lines · Stephen Hemminger
Quoted 31 lines · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Stephen Hemminger
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4It appears that is already in the code I am testing in linux-next...
Quoted 7 lines
It's in -next now, but it wasn't at the time you reported the bug.
And it would sortof explain the bug if the INQUIRY data is correct in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the case.
Now the other interesting thing is the memset in
__scsi_exectute, which looks very suspicious. Try the following please:drivers/scsi/scsi_lib.c +2
-1@@ -253,7 +253,8 @@ static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) -memset (buffer + (bufflen - rq->resid_len),0 , rq->resid_len); +// memset(buffer + (bufflen - rq->resid_len), 0, rq->resid_len); +printk_ratelimited ("%s: got resid %d\n" , __func__, rq->resid_len);
Quoted 6 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, · line 260
Quoted 2 lines
drivers/scsi/scsi_lib.c +0
-0if (resid) *resid = rq->resid_len;Still fails but does print resid on some of the later INQUIRY commands (not the initial one).
Can you test what happens if you blank out the storvsc_drv workaround:
drivers/scsi/storvsc_drv.c +2 -2
@@ -1060,13 +1060,13 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,* We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in that case. */ - +#if 0 if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { vstor_packet->vm_srb.scsi_status =0 ; vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; } - +#endif /* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status;
It might thappen that we're fail to interpret the 'Device not present' status correctly (which will happen for non-connected DVDs) causing the SCSI stack to make incorrect decisions later on.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
Quoted 65 lines · On Thu, 2 Mar 2017 14:25:14 +0100 Hannes Reinecke <[email protected]> wrote:
Quoted 34 lines · Stephen Hemminger
Quoted 31 lines · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Stephen Hemminger
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4It appears that is already in the code I am testing in linux-next...
Quoted 7 lines
It's in -next now, but it wasn't at the time you reported the bug.
And it would sortof explain the bug if the INQUIRY data is correct in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the case.
Now the other interesting thing is the memset in
__scsi_exectute, which looks very suspicious. Try the following please:drivers/scsi/scsi_lib.c +2
-1@@ -253,7 +253,8 @@ static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) -memset (buffer + (bufflen - rq->resid_len),0 , rq->resid_len); +// memset(buffer + (bufflen - rq->resid_len), 0, rq->resid_len); +printk_ratelimited ("%s: got resid %d\n" , __func__, rq->resid_len);Quoted 6 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, · line 260
Quoted 2 lines
drivers/scsi/scsi_lib.c +0
-0if (resid) *resid = rq->resid_len;Still fails but does print resid on some of the later INQUIRY commands (not the initial one).
Can you test what happens if you blank out the
storvsc_drvworkaround:drivers/scsi/storvsc_drv.c +2
-2@@ -1060,13 +1060,13 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, * We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in that case. */ - +#if 0 if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { vstor_packet->vm_srb.scsi_status =0 ; vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; } - +#endif /* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status;
Quoted 7 lines
It might thappen that we're fail to interpret the 'Device not present' status correctly (which will happen for non-connected DVDs) causing the SCSI stack to make incorrect decisions later on.
Cheers,
Hannes
Makes no difference, that was one of the first things I tried (and just tried again).
Quoted 65 lines · On Thu, 2 Mar 2017 14:25:14 +0100 Hannes Reinecke <[email protected]> wrote:
Quoted 34 lines · Stephen Hemminger
Quoted 31 lines · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Stephen Hemminger
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4It appears that is already in the code I am testing in linux-next...
Quoted 7 lines
It's in -next now, but it wasn't at the time you reported the bug.
And it would sortof explain the bug if the INQUIRY data is correct in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the case.
Now the other interesting thing is the memset in
__scsi_exectute, which looks very suspicious. Try the following please:drivers/scsi/scsi_lib.c +2
-1@@ -253,7 +253,8 @@ static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) -memset (buffer + (bufflen - rq->resid_len),0 , rq->resid_len); +// memset(buffer + (bufflen - rq->resid_len), 0, rq->resid_len); +printk_ratelimited ("%s: got resid %d\n" , __func__, rq->resid_len);Quoted 6 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, · line 260
Quoted 2 lines
drivers/scsi/scsi_lib.c +0
-0if (resid) *resid = rq->resid_len;Still fails but does print resid on some of the later INQUIRY commands (not the initial one).
Can you test what happens if you blank out the
storvsc_drvworkaround:drivers/scsi/storvsc_drv.c +2
-2@@ -1060,13 +1060,13 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, * We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in that case. */ - +#if 0 if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { vstor_packet->vm_srb.scsi_status =0 ; vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; } - +#endif /* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status;
Quoted 7 lines
It might thappen that we're fail to interpret the 'Device not present' status correctly (which will happen for non-connected DVDs) causing the SCSI stack to make incorrect decisions later on.
Cheers,
Hannes
There are several oddities about the host SCSI interface that I see:
1. The host bus seems to report up to 6 devices even though only 2 are present (Disk and CDROM).
2. The CDROM emulation doesn't report the same status as a real device.
3. The host emulation of SCSI doesn't support all the page codes which is why there is the hack.
But as James said, these don't appear to be related to the failure because the code worked before and only in post 4.11 merege is there a problem.
James Bottomley
maintainerQuoted 99 lines · Stephen Hemminger
Quoted 7 lines · On Thu, 2 Mar 2017 14:25:14 +0100 Hannes Reinecke <[email protected]> wrote:
Quoted 6 lines · Stephen Hemminger
Quoted 3 lines · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 1 line · Christoph Hellwig
On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It appears that is already in the code I am testing in
linux-next...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It's in -next now, but it wasn't at the time you reported the
bug.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
And it would sortof explain the bug if the INQUIRY data is
correct
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the
case.
Quoted 9 lines
Quoted 9 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device
Quoted 9 lines
Now the other interesting thing is the memset in
__scsi_exectute, which looks very suspicious. Try the following please:drivers/scsi/scsi_lib.c +0
-0@@ -253,7 +253,8 @@ static int __scsi_execute(struct scsi_device*sdev, const unsigned char *cmd,
Quoted 6 lines
Quoted 6 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device · line 257
Quoted 6 lines
drivers/scsi/scsi_lib.c +2
-1* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) -memset (buffer + (bufflen - rq->resid_len),0 , rq->resid_len); +// memset(buffer + (bufflen - rq->resid_len), 0, rq->resid_len); + printk_ratelimited("%s: got resid %d\n", __func__,
rq->resid_len);Quoted 6 lines
Quoted 6 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device · line 259
Quoted 3 lines
drivers/scsi/scsi_lib.c +0
-0if (resid) *resid = rq->resid_len;Still fails but does print resid on some of the later INQUIRY
commands (not the initial one).
Quoted 2 lines
Quoted 1 line
Can you test what happens if you blank out the
storvsc_drvworkaround:
Quoted 6 lines
drivers/scsi/storvsc_drv.c +0
-0drivers/scsi/storvsc_drv.c static void storvsc_on_io_completion(struct · line 1068
Quoted 10 lines
drivers/scsi/storvsc_drv.c +1
-1@@ -1060,13 +1060,13 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, * We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in that case. */ - +#if 0 if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { vstor_packet->vm_srb.scsi_status =0 ; vstor_packet->vm_srb.srb_status =
SRB_STATUS_SUCCESS;Quoted 6 lines
drivers/scsi/storvsc_drv.c +1
-1} - +#endif /* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status =
vstor_packet->vm_srb.scsi_status;Quoted 2 lines
It might thappen that we're fail to interpret the 'Device not
present'
Quoted 1 line
status correctly (which will happen for non-connected DVDs) causing
the
Quoted 5 lines
SCSI stack to make incorrect decisions later on.
Cheers,
Hannes
There are several oddities about the host SCSI interface that I see:
1. The host bus seems to report up to 6 devices even though only 2 are present (Disk and CDROM).
2. The CDROM emulation doesn't report the same status as a real device.
3. The host emulation of SCSI doesn't support all the page codes which is why there is the hack.
Quoted 3 lines
But as James said, these don't appear to be related to the failure because
the code worked before and only in post 4.11 merege is there a problem.
Your wait for the hang trace is the most suggestive. It says we're waiting for a partition read to the spurious device. Previously this would have failed or timed out, so this seems to be the root cause.
James
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Quoted 100 lines · On Thu, 02 Mar 2017 10:36:17 -0800 James Bottomley…
Quoted 99 lines · Stephen Hemminger
Quoted 7 lines · On Thu, 2 Mar 2017 14:25:14 +0100 Hannes Reinecke <[email protected]> wrote:
Quoted 6 lines · Stephen Hemminger
Quoted 3 lines · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 1 line · Christoph Hellwig
On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It appears that is already in the code I am testing in
linux-next...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It's in -next now, but it wasn't at the time you reported the
bug.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
And it would sortof explain the bug if the INQUIRY data is
correct
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the
case.
Quoted 9 lines
Quoted 9 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device
Quoted 9 lines
Now the other interesting thing is the memset in
__scsi_exectute, which looks very suspicious. Try the following please:drivers/scsi/scsi_lib.c +0
-0@@ -253,7 +253,8 @@ static int __scsi_execute(struct scsi_device*sdev, const unsigned char *cmd,
Quoted 6 lines
Quoted 6 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device · line 257
Quoted 6 lines
drivers/scsi/scsi_lib.c +2
-1* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) -memset (buffer + (bufflen - rq->resid_len),0 , rq->resid_len); +// memset(buffer + (bufflen - rq->resid_len), 0, rq->resid_len); + printk_ratelimited("%s: got resid %d\n", __func__,
rq->resid_len);Quoted 6 lines
Quoted 6 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct scsi_device · line 259
Quoted 3 lines
drivers/scsi/scsi_lib.c +0
-0if (resid) *resid = rq->resid_len;Still fails but does print resid on some of the later INQUIRY
commands (not the initial one).
Quoted 2 lines
Quoted 1 line
Can you test what happens if you blank out the
storvsc_drvworkaround:
Quoted 6 lines
drivers/scsi/storvsc_drv.c +0
-0drivers/scsi/storvsc_drv.c static void storvsc_on_io_completion(struct · line 1068
Quoted 10 lines
drivers/scsi/storvsc_drv.c +1
-1@@ -1060,13 +1060,13 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, * We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in that case. */ - +#if 0 if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { vstor_packet->vm_srb.scsi_status =0 ; vstor_packet->vm_srb.srb_status =
SRB_STATUS_SUCCESS;Quoted 6 lines
drivers/scsi/storvsc_drv.c +1
-1} - +#endif /* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status =
vstor_packet->vm_srb.scsi_status;Quoted 2 lines
It might thappen that we're fail to interpret the 'Device not
present'
Quoted 1 line
status correctly (which will happen for non-connected DVDs) causing
the
Quoted 5 lines
SCSI stack to make incorrect decisions later on.
Cheers,
Hannes
There are several oddities about the host SCSI interface that I see:
1. The host bus seems to report up to 6 devices even though only 2 are present (Disk and CDROM).
2. The CDROM emulation doesn't report the same status as a real device.
3. The host emulation of SCSI doesn't support all the page codes which is why there is the hack.
Quoted 9 lines
Quoted 3 lines
But as James said, these don't appear to be related to the failure because
the code worked before and only in post 4.11 merege is there a problem.Your wait for the hang trace is the most suggestive. It says we're waiting for a partition read to the spurious device. Previously this would have failed or timed out, so this seems to be the root cause.
James
Where is the number of valid LUN's determined during the scan process?
James Bottomley
maintainerQuoted 126 lines · Stephen Hemminger
Quoted 1 line · On Thu, 02 Mar 2017 10:36:17 -0800 James Bottomley…
On March 2, 2017 10:23:24 AM PST, Stephen Hemminger
Quoted 8 lines · <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines · On Thu, 2 Mar 2017 14:25:14 +0100 Hannes Reinecke <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger
Quoted 1 line · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
On Thu, Mar 02, 2017 at 01:01:35AM +0100, Christoph Hellwig
Quoted 18 lines · wrote:
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
It appears that is already in the code I am testing in
linux-next...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It's in -next now, but it wasn't at the time you reported the
bug.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
And it would sortof explain the bug if the INQUIRY data is
correct
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
in the scatterlist, but we ignore it, given that
scsi_probe_lunQuoted 9 lines
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
ignores the result based on sense data.
Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the
case.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Now the other interesting thing is the memset in
__scsi_exectute,Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct
Quoted 7 lines
which looks very suspicious. Try the following please:
drivers/scsi/scsi_lib.c +0
-0@@ -253,7 +253,8 @@ static int __scsi_execute(struct
scsi_deviceQuoted 5 lines
Quoted 5 lines
*sdev, const unsigned char *cmd,
Quoted 4 lines
Quoted 4 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct · line 256
Quoted 4 lines
drivers/scsi/scsi_lib.c +0
-1* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) - memset(buffer + (bufflen - rq->resid_len), 0,
rq->resid_len);Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/scsi/scsi_lib.c static int __scsi_execute(struct · line 256
Quoted 1 line
drivers/scsi/scsi_lib.c +1
-0+// memset(buffer + (bufflen - rq->resid_len), 0,
rq->resid_len);Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
drivers/scsi/scsi_lib.c static int __scsi_execute(struct · line 257
Quoted 1 line
drivers/scsi/scsi_lib.c +1
-0+ printk_ratelimited("%s: got resid %d\n", __func__,
rq->resid_len);Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
drivers/scsi/scsi_lib.c +0
-0if (resid) *resid = rq->resid_len;Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Still fails but does print resid on some of the later INQUIRY
commands (not the initial one).
Quoted 2 lines
Quoted 1 line
Can you test what happens if you blank out the
storvsc_drvworkaround:
Review
Quoted 2 lines
(quoted diff) +0
-0
b/drivers/scsi/storvsc_drv.cQuoted 4 lines
Quoted 4 lines
drivers/scsi/storvsc_drv.c static void
Quoted 4 lines
index 585e54f..c36f42d 100644
drivers/scsi/storvsc_drv.c +0
-0@@ -1060,13 +1060,13 @@ static voidstorvsc_on_io_completion(struct
Quoted 3 lines
Quoted 3 lines
drivers/scsi/storvsc_drv.c static void · line 1062
Quoted 3 lines
drivers/scsi/storvsc_drv.c +0
-0storvsc_device *stor_device, * We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in thatcase.
Quoted 12 lines
Quoted 12 lines
drivers/scsi/storvsc_drv.c static void storvsc_on_io_completion(struct storvsc_device *stor_device,
Quoted 7 lines
drivers/scsi/storvsc_drv.c +1
-1*/ - +#if 0 if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { vstor_packet->vm_srb.scsi_status =0 ; vstor_packet->vm_srb.srb_status =
SRB_STATUS_SUCCESS;Quoted 4 lines
drivers/scsi/storvsc_drv.c +1
-1} - +#endif Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
drivers/scsi/storvsc_drv.c +0
-0/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status =
vstor_packet->vm_srb.scsi_status;Quoted 2 lines
It might thappen that we're fail to interpret the 'Device not
present'
Quoted 1 line
status correctly (which will happen for non-connected DVDs)
causing
Quoted 9 lines
Quoted 9 lines
the
Quoted 5 lines
SCSI stack to make incorrect decisions later on.
Cheers,
Hannes
There are several oddities about the host SCSI interface that I see:
1. The host bus seems to report up to 6 devices even though only 2are
Quoted 2 lines
Quoted 2 lines
present (Disk and CDROM).
2. The CDROM emulation doesn't report the same status as a realdevice.
Quoted 1 line
Quoted 1 line
3. The host emulation of SCSI doesn't support all the page codes
which
Quoted 5 lines
Quoted 5 lines
is why there is the hack.
But as James said, these don't appear to be related to the failure because
the code worked before and only in post 4.11 merege is there aproblem.
Quoted 2 lines
Your wait for the hang trace is the most suggestive. It says we're
Quoted 8 lines
waiting for a partition read to the spurious device. Previously this would have failed or timed out, so this seems to be the root cause.
Quoted 4 lines
James
Where is the number of valid LUN's determined during the scan process?
Depends. If you can do a report lun scan then that's definitive. You seem to be probing (SCSI_probe_and_add_lun) and you make us think there's something there by responding wrongly to the initial inquiry.
James
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Quoted 130 lines · On Thu, 02 Mar 2017 11:18:23 -0800 James Bottomley…
Quoted 129 lines · Stephen Hemminger
Quoted 1 line · On Thu, 02 Mar 2017 10:36:17 -0800 James Bottomley…
On March 2, 2017 10:23:24 AM PST, Stephen Hemminger
Quoted 8 lines · <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines · On Thu, 2 Mar 2017 14:25:14 +0100 Hannes Reinecke <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger
Quoted 1 line · On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig <[email protected]> wrote:
On Thu, Mar 02, 2017 at 01:01:35AM +0100, Christoph Hellwig
Quoted 18 lines · wrote:
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
It appears that is already in the code I am testing in
linux-next...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It's in -next now, but it wasn't at the time you reported the
bug.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
And it would sortof explain the bug if the INQUIRY data is
correct
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
in the scatterlist, but we ignore it, given that
scsi_probe_lunQuoted 9 lines
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
ignores the result based on sense data.
Can you check what happens with the horrible hack below:
Strike that - we're checking result later, so this can't be the
case.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Now the other interesting thing is the memset in
__scsi_exectute,Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct
Quoted 7 lines
which looks very suspicious. Try the following please:
drivers/scsi/scsi_lib.c +0
-0@@ -253,7 +253,8 @@ static int __scsi_execute(struct
scsi_deviceQuoted 5 lines
Quoted 5 lines
*sdev, const unsigned char *cmd,
Quoted 4 lines
Quoted 4 lines
drivers/scsi/scsi_lib.c static int __scsi_execute(struct · line 256
Quoted 4 lines
drivers/scsi/scsi_lib.c +0
-1* and prevent security leaks by zeroing out the excess data. */ if (unlikely (rq->resid_len >0 && rq->resid_len <= bufflen)) - memset(buffer + (bufflen - rq->resid_len), 0,
rq->resid_len);Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/scsi/scsi_lib.c static int __scsi_execute(struct · line 256
Quoted 1 line
drivers/scsi/scsi_lib.c +1
-0+// memset(buffer + (bufflen - rq->resid_len), 0,
rq->resid_len);Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
drivers/scsi/scsi_lib.c static int __scsi_execute(struct · line 257
Quoted 1 line
drivers/scsi/scsi_lib.c +1
-0+ printk_ratelimited("%s: got resid %d\n", __func__,
rq->resid_len);Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
drivers/scsi/scsi_lib.c +0
-0if (resid) *resid = rq->resid_len;Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Still fails but does print resid on some of the later INQUIRY
commands (not the initial one).
Quoted 2 lines
Quoted 1 line
Can you test what happens if you blank out the
storvsc_drvworkaround:
Review
Quoted 2 lines
(quoted diff) +0
-0
b/drivers/scsi/storvsc_drv.cQuoted 4 lines
Quoted 4 lines
drivers/scsi/storvsc_drv.c static void
Quoted 4 lines
index 585e54f..c36f42d 100644
drivers/scsi/storvsc_drv.c +0
-0@@ -1060,13 +1060,13 @@ static voidstorvsc_on_io_completion(struct
Quoted 3 lines
Quoted 3 lines
drivers/scsi/storvsc_drv.c static void · line 1062
Quoted 3 lines
drivers/scsi/storvsc_drv.c +0
-0storvsc_device *stor_device, * We do this so we can distinguish truly fatal failues * (srb status == 0x4) and off-line the device in thatcase.
Quoted 12 lines
Quoted 12 lines
drivers/scsi/storvsc_drv.c static void storvsc_on_io_completion(struct storvsc_device *stor_device,
Quoted 7 lines
drivers/scsi/storvsc_drv.c +1
-1*/ - +#if 0 if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { vstor_packet->vm_srb.scsi_status =0 ; vstor_packet->vm_srb.srb_status =
SRB_STATUS_SUCCESS;Quoted 4 lines
drivers/scsi/storvsc_drv.c +1
-1} - +#endif Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
drivers/scsi/storvsc_drv.c +0
-0/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status =
vstor_packet->vm_srb.scsi_status;Quoted 2 lines
It might thappen that we're fail to interpret the 'Device not
present'
Quoted 1 line
status correctly (which will happen for non-connected DVDs)
causing
Quoted 9 lines
Quoted 9 lines
the
Quoted 5 lines
SCSI stack to make incorrect decisions later on.
Cheers,
Hannes
There are several oddities about the host SCSI interface that I see:
1. The host bus seems to report up to 6 devices even though only 2are
Quoted 2 lines
Quoted 2 lines
present (Disk and CDROM).
2. The CDROM emulation doesn't report the same status as a realdevice.
Quoted 1 line
Quoted 1 line
3. The host emulation of SCSI doesn't support all the page codes
which
Quoted 5 lines
Quoted 5 lines
is why there is the hack.
But as James said, these don't appear to be related to the failure because
the code worked before and only in post 4.11 merege is there aproblem.
Quoted 2 lines
Your wait for the hang trace is the most suggestive. It says we're
waiting for a partition read to the spurious device. Previously this would have failed or timed out, so this seems to be the root cause.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
James
Where is the number of valid LUN's determined during the scan process?
Depends. If you can do a report lun scan then that's definitive. You seem to be probing (
SCSI_probe_and_add_lun) and you make us think there's something there by responding wrongly to the initial inquiry.
Testing a fix now. There looks like 3 problems here:
1. storvsc_io_completion masks all error responses from INQUIRY
2. Error handling in storvsc does not report invalid LUN correctly.
3. Block layer has new problems when device is in bad state (not present and timing out).
The first two have been there for 4 years but did not cause problems. Something happened that made kernel chew lots of resources and eventually die when it hits a disconnected device that is not detected properly.
RFC 1/1 hv_storvsc: error handling.
In reply to James BottomleyNeeds more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH] hv_storvsc: fix error handling
The Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and MODE_SENSE commands. This caused the scan process to incorrectly think devices were present and online. Also invalid LUN errors were not being handled correctly.
This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit 4ed51a21c0f69 ("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY and MODE_SENSE")
--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------------------ 1 file changed, 4 insertions(+), 44 deletions(-)
drivers/scsi/storvsc_drv.c +4 -44
@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct work_struct *work)kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host); - -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to * messages that we have sent out. An example of this would be messages
@@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED : if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID &&
@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case. -*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; - } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length = vstor_packet->vm_srb.sense_info_length; -if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) +if (stor_pkt->vm_srb.cdb[0 ] !=INQUIRY && + (vstor_packet->vm_srb.scsi_status !=0 || + vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS )) storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb status 0x%x\n", stor_pkt->vm_srb.cdb[0],
Signature · 1 line
2.11.0
Re: [RFC] hv_storvsc: error handling.
Quoted 90 lines · Stephen Hemminger
Needs more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH]
hv_storvsc: fix error handlingThe Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and
MODE_SENSEcommands. This caused the scan process to incorrectly think devices were present and online. Also invalid LUN errors were not being handled correctly.This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit
4ed51a21c0f69("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY andMODE_SENSE")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------------------ 1 file changed, 4 insertions(+), 44 deletions(-)drivers/scsi/storvsc_drv.c +1
-42@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct work_struct *work)kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host); - -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to * messages that we have sent out. An example of this would be messages @@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED : if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID &&@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case. -*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; - } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length =
drivers/scsi/storvsc_drv.c static void storvsc_on_io_completion(struct storvsc_device *stor_device, · line 1041
Quoted 10 lines
drivers/scsi/storvsc_drv.c +3
-2vstor_packet->vm_srb.sense_info_length; -if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) +if (stor_pkt->vm_srb.cdb[0 ] !=INQUIRY && + (vstor_packet->vm_srb.scsi_status !=0 || + vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS )) storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb status 0x%x\n", stor_pkt->vm_srb.cdb[0],
I really do wonder; according to the comments above the wrong error handling really only affects inquiry VPD page 0x80 and MODE_SENSE page 0x1c. So why do we need to blank out _every_ inquiry? Wouldn't it far better to check _what_ goes wrong when asking for page 0x80, and fix up things correctly?
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
RE: [RFC] hv_storvsc: error handling.
In reply to Stephen HemmingerQuoted 118 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, March 3, 2017 4:50 PM
To: James Bottomley <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: [RFC]hv_storvsc: error handling.Needs more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH]
hv_storvsc: fix error handlingThe Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and
MODE_SENSEcommands. This caused the scan process to incorrectly think devices were present and online. Also invalid LUN errors were not being handled correctly.This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit
4ed51a21c0f69("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY andMODE_SENSE")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------------------ 1 file changed, 4 insertions(+), 44 deletions(-)drivers/scsi/storvsc_drv.c +0
-22@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct work_struct *work)kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host); - -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to * messages that we have sent out. An example of this would be messages
drivers/scsi/storvsc_drv.c +1
-2@@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED :if (
vm_srb->srb_status&SRB_STATUS_AUTOSENSE_VALID
&&drivers/scsi/storvsc_drv.c +3
-20@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case. -*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; - } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length = vstor_packet->vm_srb.sense_info_length; -if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) +if (stor_pkt->vm_srb.cdb[0 ] !=INQUIRY && + (vstor_packet->vm_srb.scsi_status !=0 || + vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS )) storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb status 0x%x\n",
Quoted 2 lines
stor_pkt->vm_srb.cdb[0],
--
This patch gets rid of the ability to "hot remove" LUNs. I don't think that can be part of any solution. The INQUIRY hack I put in a long time ago was to deal with host bugs on prior versions of Windows server. WS2016 should not be trigerring this code. Stephen, could you please test this patch - a quick hack:
Quoted 1 line
From
b97f24f224a71a6e745c42e5640045a553eb407cMon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <[email protected]>
Date: Sat, 4 Mar 2017 14:00:46 -0700
Subject: [PATCH 1/1] scsi: storvsc: Fix a bug in LUN removal code
Reply-To: [email protected]
--- drivers/scsi/storvsc_drv.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
drivers/scsi/storvsc_drv.c +13 -0
@@ -885,6 +885,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,struct storvsc_scan_work *wrk;void (*process_err_fn)(struct work_struct *work);bool do_work = false; +struct scsi_device *sdev;switch (SRB_STATUS (vm_srb->srb_status)) {case SRB_STATUS_ERROR :
@@ -911,6 +912,18 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : +if (!scsi_host_get (host)) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } + + sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); + +if (!sdev) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } + do_work = true; process_err_fn = storvsc_remove_lun;break ;
--
1.7.1
Quoted 3 lines
2.11.0
Re: [RFC] hv_storvsc: error handling.
Quoted 177 lines · KY Srinivasan
Quoted 132 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, March 3, 2017 4:50 PM
To: James Bottomley <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian
Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: [RFC]hv_storvsc: error handling.Needs more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH]
hv_storvsc: fix error handlingThe Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and
MODE_SENSEcommands. This caused the scan process to incorrectly think
devices were present and online. Also invalid LUN errors were not being handled correctly.This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit
4ed51a21c0f69("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY andMODE_SENSE")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------ ------------ 1 file changed, 4 insertions(+), 44 deletions(-)drivers/scsi/storvsc_drv.c +0
-0@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct
work_struct
*work)drivers/scsi/storvsc_drv.c +0
-23kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk ->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host); - -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to
* messages that we have sent out. An example of this would be
messagesdrivers/scsi/storvsc_drv.c +1
-2@@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED :if (
vm_srb->srb_status&SRB_STATUS_AUTOSENSE_VALID
&&drivers/scsi/storvsc_drv.c +0
-9@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case.
drivers/scsi/storvsc_drv.c +0
-6-*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =
SRB_STATUS_SUCCESS;drivers/scsi/storvsc_drv.c +3
-7- } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet ->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet ->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length = vstor_packet->vm_srb.sense_info_length; -if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) + if (stor_pkt->vm_srb.cdb[0] != INQUIRY && + (vstor_packet->vm_srb.scsi_status != 0 || + vstor_packet->vm_srb.srb_status !=
SRB_STATUS_SUCCESS))drivers/scsi/storvsc_drv.c +0
-0storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb statusQuoted 3 lines
0x%x\n",
stor_pkt->vm_srb.cdb[0],
--This patch gets rid of the ability to "hot remove" LUNs. I don't think that can be part of any
solution. The INQUIRY hack I put in a long time ago was to deal with host bugs on prior versions of
Windows server. WS2016 should not be trigerring this code. Stephen, could you please test this patch -
a quick hack:From
b97f24f224a71a6e745c42e5640045a553eb407cMon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <[email protected]>
Date: Sat, 4 Mar 2017 14:00:46 -0700
Subject: [PATCH 1/1] scsi: storvsc: Fix a bug in LUN removal code
Reply-To: [email protected]Signed-off-by K. Y. Srinivasan <[email protected]>--- drivers/scsi/storvsc_drv.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)drivers/scsi/storvsc_drv.c +1
-0@@ -885,6 +885,7 @@ static void storvsc_handle_error(structvmscsi_request *vm_srb, struct storvsc_scan_work *wrk;void (*process_err_fn)(struct work_struct *work);bool do_work = false; +struct scsi_device *sdev;switch (SRB_STATUS (vm_srb->srb_status)) {case
SRB_STATUS_ERROR:drivers/scsi/storvsc_drv.c +3
-0@@ -911,6 +912,18 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : +if (!scsi_host_get (host)) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ;
drivers/scsi/storvsc_drv.c static void storvsc_handle_error(struct · line 928
Quoted 10 lines
drivers/scsi/storvsc_drv.c +9
-0+ } + + sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); + +if (!sdev) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } +
You're now getting two references (one to the host and one to the device) that you don't put either in error handling or in storvsc_remove_lun().
Probably you should eliminate the scsi_host_get and scsi_device_lookup in storvsc_remove_lun() (making it basically remove device put device put host) and add a host put in the !sdev if above.
James
RE: [RFC] hv_storvsc: error handling.
Quoted 209 lines
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Saturday, March 4, 2017 1:37 PM
To: KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <torvalds@linux- foundation.org>; Martin K. Petersen <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian Suhov (Cloudbase Solutions SRL) <[email protected]>; [email protected]; Haiyang Zhang <[email protected]>
Subject: Re: [RFC]hv_storvsc: error handling.Quoted 177 lines · KY Srinivasan
Quoted 132 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, March 3, 2017 4:50 PM
To: James Bottomley <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian
Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: [RFC]hv_storvsc: error handling.Needs more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH]
hv_storvsc: fix error handlingThe Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and
MODE_SENSEcommands. This caused the scan process to incorrectly think
devices were present and online. Also invalid LUN errors were not being handled correctly.This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit
4ed51a21c0f69("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY andMODE_SENSE")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------ ------------ 1 file changed, 4 insertions(+), 44 deletions(-)drivers/scsi/storvsc_drv.c +0
-0@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct
work_struct
*work)drivers/scsi/storvsc_drv.c +0
-23kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk ->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host); - -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to
* messages that we have sent out. An example of this would be
messagesdrivers/scsi/storvsc_drv.c +1
-2@@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED :if (
vm_srb->srb_status&SRB_STATUS_AUTOSENSE_VALID
&&drivers/scsi/storvsc_drv.c +0
-9@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case.
drivers/scsi/storvsc_drv.c +0
-6-*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =
SRB_STATUS_SUCCESS;drivers/scsi/storvsc_drv.c +3
-7- } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet ->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet ->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length = vstor_packet->vm_srb.sense_info_length; -if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) + if (stor_pkt->vm_srb.cdb[0] != INQUIRY && + (vstor_packet->vm_srb.scsi_status != 0 || + vstor_packet->vm_srb.srb_status !=
SRB_STATUS_SUCCESS))drivers/scsi/storvsc_drv.c +0
-0storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb statusQuoted 3 lines
0x%x\n",
stor_pkt->vm_srb.cdb[0],
--This patch gets rid of the ability to "hot remove" LUNs. I don't think that can be part of any
solution. The INQUIRY hack I put in a long time ago was to deal with host bugs on prior versions of
Windows server. WS2016 should not be trigerring this code. Stephen, could you please test this patch -
a quick hack:From
b97f24f224a71a6e745c42e5640045a553eb407cMon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <[email protected]>
Date: Sat, 4 Mar 2017 14:00:46 -0700
Subject: [PATCH 1/1] scsi: storvsc: Fix a bug in LUN removal code
Reply-To: [email protected]Signed-off-by K. Y. Srinivasan <[email protected]>--- drivers/scsi/storvsc_drv.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)drivers/scsi/storvsc_drv.c +1
-0@@ -885,6 +885,7 @@ static void storvsc_handle_error(structvmscsi_request *vm_srb, struct storvsc_scan_work *wrk;void (*process_err_fn)(struct work_struct *work);bool do_work = false; +struct scsi_device *sdev;switch (SRB_STATUS (vm_srb->srb_status)) {case
SRB_STATUS_ERROR:drivers/scsi/storvsc_drv.c +3
-0@@ -911,6 +912,18 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : +if (!scsi_host_get (host)) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ;drivers/scsi/storvsc_drv.c static void storvsc_handle_error(struct · line 928
Quoted 10 lines
drivers/scsi/storvsc_drv.c +9
-0+ } + + sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); + +if (!sdev) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } +You're now getting two references (one to the host and one to the device) that you don't put either in error handling or in
storvsc_remove_lun().
Quoted 3 lines
Probably you should eliminate the
scsi_host_getandscsi_device_lookupinstorvsc_remove_lun()(making it basically remove device put device put host) and add a host put in the !sdev if above.
Yes; this was a quick hack to prove a theory. This should work (I hope); I will cleanup and resend once Stephen verifies.
K. Y
Quoted 2 lines
James
RE: [RFC] hv_storvsc: error handling.
Quoted 228 lines
-----Original Message-----
From: KY Srinivasan
Sent: Saturday, March 4, 2017 1:40 PM
To: 'James Bottomley' <[email protected]>; Stephen Hemminger <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <torvalds@linux- foundation.org>; Martin K. Petersen <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian Suhov (Cloudbase Solutions SRL) <[email protected]>; [email protected]; Haiyang Zhang <[email protected]>
Subject: RE: [RFC]hv_storvsc: error handling.Quoted 6 lines
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Saturday, March 4, 2017 1:37 PM
To: KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>;Jens
Quoted 4 lines
Axboe <[email protected]>; Linus Torvalds <torvalds@linux- foundation.org>; Martin K. Petersen <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian Suhov (Cloudbase Solutions
SRL)
Quoted 11 lines
<[email protected]>; [email protected]; Haiyang Zhang <[email protected]>
Subject: Re: [RFC]hv_storvsc: error handling.Quoted 6 lines · KY Srinivasan
Quoted 6 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, March 3, 2017 4:50 PM
To: James Bottomley <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph HellwigQuoted 186 lines
Quoted 171 lines
Quoted 126 lines
James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian
Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: [RFC]hv_storvsc: error handling.Needs more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH]
hv_storvsc: fix error handlingThe Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and
MODE_SENSEcommands. This caused the scan process to incorrectly think
devices were present and online. Also invalid LUN errors were not being handled correctly.This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit
4ed51a21c0f69("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY andMODE_SENSE")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------ ------------ 1 file changed, 4 insertions(+), 44 deletions(-)drivers/scsi/storvsc_drv.c +0
-0@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct
work_struct
*work)drivers/scsi/storvsc_drv.c +0
-23kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk ->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host); - -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to
* messages that we have sent out. An example of this would be
messagesdrivers/scsi/storvsc_drv.c +1
-2@@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED :if (
vm_srb->srb_status&SRB_STATUS_AUTOSENSE_VALID
&&drivers/scsi/storvsc_drv.c +0
-9@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case.
drivers/scsi/storvsc_drv.c +0
-6-*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =
SRB_STATUS_SUCCESS;drivers/scsi/storvsc_drv.c +3
-7- } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet ->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet ->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length = vstor_packet->vm_srb.sense_info_length; -if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) + if (stor_pkt->vm_srb.cdb[0] != INQUIRY && + (vstor_packet->vm_srb.scsi_status != 0 || + vstor_packet->vm_srb.srb_status !=
SRB_STATUS_SUCCESS))drivers/scsi/storvsc_drv.c +0
-0storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb statusQuoted 3 lines
0x%x\n",
stor_pkt->vm_srb.cdb[0],
--This patch gets rid of the ability to "hot remove" LUNs. I don't think that can be part of any
solution. The INQUIRY hack I put in a long time ago was to deal with host bugs on prior versions of
Windows server. WS2016 should not be trigerring this code. Stephen, could you please test this patch -
a quick hack:From
b97f24f224a71a6e745c42e5640045a553eb407cMon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <[email protected]>
Date: Sat, 4 Mar 2017 14:00:46 -0700
Subject: [PATCH 1/1] scsi: storvsc: Fix a bug in LUN removal code
Reply-To: [email protected]Signed-off-by K. Y. Srinivasan <[email protected]>--- drivers/scsi/storvsc_drv.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)drivers/scsi/storvsc_drv.c +1
-0@@ -885,6 +885,7 @@ static void storvsc_handle_error(structvmscsi_request *vm_srb, struct storvsc_scan_work *wrk;void (*process_err_fn)(struct work_struct *work);bool do_work = false; +struct scsi_device *sdev;switch (SRB_STATUS (vm_srb->srb_status)) {case
SRB_STATUS_ERROR:drivers/scsi/storvsc_drv.c +3
-0@@ -911,6 +912,18 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : +if (!scsi_host_get (host)) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ;drivers/scsi/storvsc_drv.c static void storvsc_handle_error(struct · line 928
Quoted 10 lines
drivers/scsi/storvsc_drv.c +9
-0+ } + + sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); + +if (!sdev) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } +You're now getting two references (one to the host and one to the device) that you don't put either in error handling or in
storvsc_remove_lun().
Quoted 7 lines
Quoted 3 lines
Probably you should eliminate the
scsi_host_getandscsi_device_lookupinstorvsc_remove_lun()(making it basically remove device put device put host) and add a host put in the !sdev if above.Yes; this was a quick hack to prove a theory. This should work (I hope); I will cleanup and resend once
Stephen verifies.
Stephen,
Please test this patch. Have addressed the ref count issue that James pointed out.
From 6d57fb68c40165e61d84b6766b2263747d5e241d Mon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <[email protected]>
Date: Sat, 4 Mar 2017 15:57:26 -0700
Subject: [PATCH 1/1] scsi: storvsc: Fix a bug in LUN removal code
Reply-To: [email protected]
--- drivers/scsi/storvsc_drv.c | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-)
drivers/scsi/storvsc_drv.c +23 -10
@@ -478,6 +478,7 @@ struct hv_host_device {struct storvsc_scan_work {struct work_struct work;struct Scsi_Host *host; +struct scsi_device *sdev;u8 lun;u8 tgt_id; };
@@ -531,24 +532,20 @@ static void storvsc_host_scan(struct work_struct *work)kfree (wrk); } +/* +* On Entry we have a reference on both the host and the device. +* Drop them here. +*/ static void storvsc_remove_lun (struct work_struct *work) {struct storvsc_scan_work *wrk; -struct scsi_device *sdev; wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } +scsi_remove_device (wrk->sdev); +scsi_device_put (wrk->sdev);scsi_host_put (wrk->host); -done:kfree (wrk); }
@@ -885,6 +882,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,struct storvsc_scan_work *wrk;void (*process_err_fn)(struct work_struct *work);bool do_work = false; +struct scsi_device *sdev;switch (SRB_STATUS (vm_srb->srb_status)) {case SRB_STATUS_ERROR :
@@ -911,9 +909,23 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : +if (!scsi_host_get (host)) + goto host_not_known; + + sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); + +if (!sdev) + goto lun_not_known; + do_work = true; process_err_fn = storvsc_remove_lun;break ; + +lun_not_known: +scsi_host_put (host); +host_not_known: +set_host_byte (scmnd,DID_NO_CONNECT ); +break ;case SRB_STATUS_ABORTED :if (vm_srb->srb_status &SRB_STATUS_AUTOSENSE_VALID && (asc ==0x2a ) && (ascq ==0x9 )) {
@@ -939,6 +951,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,return ; } + wrk->sdev = sdev; wrk->host = host; wrk->lun = vm_srb->lun; wrk->tgt_id = vm_srb->target_id;
--
1.7.1
Quoted 4 lines
K. Y
Quoted 2 lines
James
Re: [RFC] hv_storvsc: error handling.
In reply to KY SrinivasanQuoted 156 lines · On Sat, 4 Mar 2017 21:03:41 +0000 KY Srinivasan <[email protected]> wrote:
Quoted 116 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, March 3, 2017 4:50 PM
To: James Bottomley <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: [RFC]hv_storvsc: error handling.Needs more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH]
hv_storvsc: fix error handlingThe Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and
MODE_SENSEcommands. This caused the scan process to incorrectly think devices were present and online. Also invalid LUN errors were not being handled correctly.This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit
4ed51a21c0f69("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY andMODE_SENSE")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------------------ 1 file changed, 4 insertions(+), 44 deletions(-)drivers/scsi/storvsc_drv.c +0
-22@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct work_struct *work)kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host); - -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to * messages that we have sent out. An example of this would be messages
drivers/scsi/storvsc_drv.c +1
-2@@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED :if (
vm_srb->srb_status&SRB_STATUS_AUTOSENSE_VALID
&&drivers/scsi/storvsc_drv.c +3
-20@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case. -*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; - } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length = vstor_packet->vm_srb.sense_info_length; -if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) +if (stor_pkt->vm_srb.cdb[0 ] !=INQUIRY && + (vstor_packet->vm_srb.scsi_status !=0 || + vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS )) storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb status 0x%x\n",Quoted 2 lines
stor_pkt->vm_srb.cdb[0],
This patch gets rid of the ability to "hot remove" LUNs. I don't think that can be part of any solution. The INQUIRY hack I put in a long time ago was to deal with host bugs on prior versions of Windows server. WS2016 should not be trigerring this code. Stephen, could you please test this patch - a quick hack:
From
b97f24f224a71a6e745c42e5640045a553eb407cMon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <[email protected]>
Date: Sat, 4 Mar 2017 14:00:46 -0700
Subject: [PATCH 1/1] scsi: storvsc: Fix a bug in LUN removal code
Reply-To: [email protected]Signed-off-by K. Y. Srinivasan <[email protected]>--- drivers/scsi/storvsc_drv.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)drivers/scsi/storvsc_drv.c +6
-0@@ -885,6 +885,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,struct storvsc_scan_work *wrk;void (*process_err_fn)(struct work_struct *work);bool do_work = false; +struct scsi_device *sdev;switch (SRB_STATUS (vm_srb->srb_status)) {case SRB_STATUS_ERROR :@@ -911,6 +912,18 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : +if (!scsi_host_get (host)) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } +
drivers/scsi/storvsc_drv.c static void storvsc_handle_error(struct vmscsi_request *vm_srb, · line 929
Quoted 10 lines
drivers/scsi/storvsc_drv.c +7
-0+ sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); + +if (!sdev) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } + do_work = true; process_err_fn = storvsc_remove_lun;break ;
I will try it, but it can't work for two reasons.
First, the INVALID_LUN error is masked off on INQUIRY in current code. Second, the scsi_device is instantiated already as part of scan probe process before it gets here.
The best solution so far is:
- remove old INQUIRY/SENSE error masking
+ add new workaround for INQUIRY of device id on LUN 0 which appears to be the reason for old masking
+ return errors on missing LUN
+ provide better transport services for hot remove (rather than detecting by failed I/O).
RE: [RFC] hv_storvsc: error handling.
Quoted 192 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Monday, March 6, 2017 8:36 AM
To: KY Srinivasan <[email protected]>
Cc: James Bottomley <[email protected]>; Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: Re: [RFC]hv_storvsc: error handling.Quoted 10 lines · On Sat, 4 Mar 2017 21:03:41 +0000 KY Srinivasan <[email protected]> wrote:
Quoted 10 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, March 3, 2017 4:50 PM
To: James Bottomley <[email protected]>
Cc: Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>;Adrian
Quoted 4 lines
Quoted 4 lines
Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: [RFC]hv_storvsc: error handling.Quoted 8 lines
Quoted 8 lines
Needs more testing but this does fix the observed problem.
From: Stephen Hemminger <[email protected]>
Subject: [PATCH]
hv_storvsc: fix error handlingThe Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and
MODE_SENSEcommands. This caused the scan process to incorrectlythink
Quoted 37 lines
Quoted 37 lines
devices were present and online. Also invalid LUN errors were not being handled correctly.
This fixes problems booting a GEN2 VM on Hyper-V. It effectively reverts commit
4ed51a21c0f69("Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY andMODE_SENSE")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/scsi/storvsc_drv.c | 48 ++++------------------------------------------ 1 file changed, 4 insertions(+), 44 deletions(-)drivers/scsi/storvsc_drv.c +0
-16@@ -543,28 +543,6 @@ static void storvsc_host_scan(struct work_struct *work)kfree (wrk); } -static void storvsc_remove_lun (struct work_struct *work) -{ -struct storvsc_scan_work *wrk; -struct scsi_device *sdev; - - wrk = container_of(work, struct storvsc_scan_work, work); -if (!scsi_host_get (wrk->host)) - goto done; - - sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); - -if (sdev) { -scsi_remove_device (sdev); -scsi_device_put (sdev); - } -scsi_host_put (wrk->host);Quoted 8 lines
drivers/scsi/storvsc_drv.c static void storvsc_host_scan(struct work_struct · line 548
Quoted 8 lines
drivers/scsi/storvsc_drv.c +0
-6- -done: -kfree (wrk); -} - -/* * We can get incoming messages from the host that are not in response to
Quoted 1 line
Quoted 1 line
* messages that we have sent out. An example of this would be
messages
Quoted 41 lines
Quoted 41 lines
drivers/scsi/storvsc_drv.c +1
-2@@ -955,8 +933,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, }break ;case SRB_STATUS_INVALID_LUN : - do_work = true; - process_err_fn = storvsc_remove_lun; +set_host_byte (scmnd,DID_NO_CONNECT );break ;case SRB_STATUS_ABORTED :if (
vm_srb->srb_status&SRB_STATUS_AUTOSENSE_VALID
&&drivers/scsi/storvsc_drv.c +0
-18@@ -1050,32 +1027,15 @@ static void storvsc_on_io_completion(structstorvsc_device *stor_device, stor_pkt = &request->vstor_packet; -/* -* The current SCSI handling on the host side does -* not correctly handle: -* INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c -* -* Setup srb and scsi status so this won't be fatal. -* We do this so we can distinguish truly fatal failues -* (srb status == 0x4) and off-line the device in that case. -*/ - -if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || - (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE )) { - vstor_packet->vm_srb.scsi_status =0 ; - vstor_packet->vm_srb.srb_status =SRB_STATUS_SUCCESS ; - } - -/* Copy over the status...etc */ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; stor_pkt->vm_srb.sense_info_length = vstor_packet->vm_srb.sense_info_length;Quoted 11 lines
Quoted 9 lines
drivers/scsi/storvsc_drv.c +3
-2-if (vstor_packet->vm_srb.scsi_status !=0 || - vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS ) +if (stor_pkt->vm_srb.cdb[0 ] !=INQUIRY && + (vstor_packet->vm_srb.scsi_status !=0 || + vstor_packet->vm_srb.srb_status !=SRB_STATUS_SUCCESS )) storvsc_log(device, STORVSC_LOGGING_WARN, "cmd 0x%x scsi status 0x%x srb status 0x%x\n",stor_pkt->vm_srb.cdb[0],
--This patch gets rid of the ability to "hot remove" LUNs. I don't think that can
be part of any
Quoted 1 line
solution. The INQUIRY hack I put in a long time ago was to deal with host
bugs on prior versions of
Quoted 1 line
Windows server. WS2016 should not be trigerring this code. Stephen, could
you please test this patch -
Quoted 3 lines
a quick hack:
From
b97f24f224a71a6e745c42e5640045a553eb407cMon Sep 17 00:00:002001
drivers/scsi/storvsc_drv.c static void storvsc_handle_error(struct
Quoted 15 lines
From: K. Y. Srinivasan <[email protected]>
Date: Sat, 4 Mar 2017 14:00:46 -0700
Subject: [PATCH 1/1] scsi: storvsc: Fix a bug in LUN removal code
Reply-To: [email protected]Signed-off-by K. Y. Srinivasan <[email protected]>--- drivers/scsi/storvsc_drv.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)drivers/scsi/storvsc_drv.c +0
-0@@ -885,6 +885,7 @@ static void storvsc_handle_error(struct
vmscsi_request*vm_srb,drivers/scsi/storvsc_drv.c static void storvsc_handle_error(struct
Quoted 8 lines
drivers/scsi/storvsc_drv.c +1
-0struct storvsc_scan_work *wrk;void (*process_err_fn)(struct work_struct *work);bool do_work = false; +struct scsi_device *sdev;switch (SRB_STATUS (vm_srb->srb_status)) {case SRB_STATUS_ERROR :@@ -911,6 +912,18 @@ static void storvsc_handle_error(struct
vmscsi_request*vm_srb,Quoted 15 lines
drivers/scsi/storvsc_drv.c +12
-0}break ;case SRB_STATUS_INVALID_LUN : +if (!scsi_host_get (host)) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } + + sdev =scsi_device_lookup (wrk->host,0 , wrk->tgt_id, wrk->lun); + +if (!sdev) { +set_host_byte (scmnd,DID_NO_CONNECT ); +break ; + } +
Quoted 8 lines
drivers/scsi/storvsc_drv.c static void storvsc_handle_error(struct vmscsi_request *vm_srb, · line 929
Quoted 3 lines
drivers/scsi/storvsc_drv.c +0
-0do_work = true; process_err_fn = storvsc_remove_lun;break ;I will try it, but it can't work for two reasons.
First, theINVALID_LUNerror is masked off on INQUIRY in current code. Second, thescsi_deviceis instantiated already as part of scan probe process before it gets here.
Was the invalid LUN in the LUN0 position. Inquiry of LUN0 support (when LUN0 is not populated) was added only recently to address host side issue.
Quoted 8 lines
The best solution so far is:
- remove old INQUIRY/SENSE error masking
+ add new workaround for INQUIRY of device id on LUN 0 which appears to be the reason for old masking
+ return errors on missing LUN
+ provide better transport services for hot remove (rather than detecting by failed I/O).
This the mechanism used by the host for notifying LUN removal - invalid LUN error code.
K. Y
Quoted 1 line
Re: [RFC] hv_storvsc: error handling.
Quoted 8 lines
Quoted 5 lines
I will try it, but it can't work for two reasons.
First, theINVALID_LUNerror is masked off on INQUIRY in current code. Second, thescsi_deviceis instantiated already as part of scan probe process before it gets here.Was the invalid LUN in the LUN0 position. Inquiry of LUN0 support (when LUN0 is not populated) was added only recently to address host side issue.
When probing the code probes with LUN 1, ...
There is a cause where kernel does INQUIRY on LUN0, it looks kernel is asking for page code 80 which is optional "Unit Serial Number". And then WS2016 is returning an error and invalid sense data. The old masking of errors caused kernel to interpret sense data as Unit Serial Number which is also not good but looks harmless.
Quoted 9 lines
Quoted 7 lines
The best solution so far is:
- remove old INQUIRY/SENSE error masking
+ add new workaround for INQUIRY of device id on LUN 0 which appears to be the reason for old masking
+ return errors on missing LUN
+ provide better transport services for hot remove (rather than detecting by failed I/O).This the mechanism used by the host for notifying LUN removal - invalid LUN error code.
This has a couple of problems. First, it means that hotplug doesn't occur until an I/O is done. Second the current code was not being truthful to block layer. If it has to handle hotplug in this manner, it should have still failed the I/O. If application was using direct I/O it would want to know that write failed.
Perhaps the existing channel mechanism can be used as notification path.
Re: [RFC] hv_storvsc: error handling.
In reply to KY SrinivasanQuoted 2 lines
Was the invalid LUN in the LUN0 position. Inquiry of LUN0 support (when LUN0 is not populated) was added only recently to address host side issue.
How does HyperV expect device scanning to happen for a not populated LUN?
REPORT SUPPORTED LUNS but nothing else on LUN 0? Maybe a TEST UNIT READY thrown? Or does it actually support the REPORT LUNS well known LU?
RE: [RFC] hv_storvsc: error handling.
Quoted 19 lines
-----Original Message-----
From: Christoph Hellwig [mailto:[email protected]]
Sent: Monday, March 6, 2017 9:06 PM
To: KY Srinivasan <[email protected]>
Cc: Stephen Hemminger <[email protected]>; James Bottomley <[email protected]>; Hannes Reinecke <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Jens Axboe <[email protected]>; Linus Torvalds <[email protected]>; Martin K. Petersen <[email protected]>; Dexuan Cui <[email protected]>; Long Li <[email protected]>; Josh Poulson <[email protected]>; Adrian Suhov (Cloudbase Solutions SRL) <[email protected]>; linux- [email protected]; Haiyang Zhang <[email protected]>
Subject: Re: [RFC]hv_storvsc: error handling.Quoted 1 line
Was the invalid LUN in the LUN0 position. Inquiry of LUN0 support (when
LUN0 is not populated)
Quoted 8 lines
Quoted 1 line
was added only recently to address host side issue.
How does HyperV expect device scanning to happen for a not populated LUN?
REPORT SUPPORTED LUNS but nothing else on LUN 0? Maybe a TEST UNIT READY
thrown? Or does it actually support the REPORT LUNS well known LU?
LUN0 on every target is supposed at least return enough data to support report luns scan for the target. It looks like if LUN0 on a target is empty DVD device, the INQUIRY data that is returned from the host is bogus. Stephen can give additional information on this.
K. Y
Quoted 29 lines · On Thu, 2 Mar 2017 01:01:35 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 3 lines · Stephen Hemminger
Quoted 1 line
http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4It appears that is already in the code I am testing in linux-next...
It's in -next now, but it wasn't at the time you reported the bug.
And it would sortof explain the bug if the INQUIRY data is correct in the scatterlist, but we ignore it, given that
scsi_probe_lunignores the result based on sense data.Can you check what happens with the horrible hack below:
drivers/scsi/scsi_scan.c +1
-1@@ -603,7 +603,7 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result,SCSI_LOG_SCAN_BUS (3 ,sdev_printk (KERN_INFO , sdev,"scsi scan: INQUIRY %s with code 0x%x\n" , result ?"failed" :"successful" , result)); - +#if 0 if (result) {/* * not-ready to ready transition [asc/ascq=0x28/0x0] @@ -628,6 +628,12 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result,if (resid == try_inquiry_len)continue ;
drivers/scsi/scsi_scan.c static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, · line 639
Quoted 10 lines
drivers/scsi/scsi_scan.c +6
-0} +#else +if (result) { +printk_ratelimited ("got result %d:\n" , result); + result =0 ; + } +#endif break ; }
I tried that hack and the printk never hit. Could be related to error being masked by storvsc driver workaround/hack.
Also let the system continue after going off in the weeds during SCSI scan. After a long time we get stuck threads then EOM.
[ 182.444084] hv_storvsc: INQUIRY cmd 0x12 0x1 0x83 scsi status 0x0 srb status 0x1 length 52 [ 182.448080] hv_storvsc: payload size 288 count 1 offset 0 len 254 pfn 0x1e3683 [ 182.448080] hv_storvsc: sg 0: phys 0x1e3683000 virt ffff885b63683000 offset 0x0 length 254 [ 182.448080] data: 00000000: 00 83 00 30 01 01 00 18 4d 53 46 54 20 20 20 20 ...0....MSFT [ 182.448080] data: 00000010: 43 77 cc 85 5f 19 c2 46 ac 48 c7 33 b9 dd 2d 2a Cw.._..F.H.3..-* [ 182.448080] data: 00000020: 01 03 00 10 60 02 24 80 43 77 cc 85 5f 19 c7 33 ....`.$.Cw.._..3 [ 182.448080] data: 00000030: b9 dd 2d 2a 00 00 00 00 00 00 00 00 00 00 00 00 ..-*............ [ 182.448080] data: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 182.448080] data: 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. [ 242.652032] INFO: task kworker/u480:0:5 blocked for more than 120 seconds. [ 242.655042] Not tainted 4.10.0-next-20170228-next+ #4 [ 242.656647] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.659539] kworker/u480:0 D 0 5 2 0x00000000 [ 242.661100] Workqueue: events_unbound async_run_entry_fn [ 242.663105] Call Trace: [ 242.664209] __schedule+0x27a/0x890 [ 242.665179] schedule+0x36/0x80 [ 242.666520] io_schedule+0x16/0x40 [ 242.667933] do_read_cache_page+0x400/0x550 [ 242.669153] ? blkdev_writepages+0x40/0x40 [ 242.670775] ? page_cache_tree_insert+0x120/0x120 [ 242.672717] read_cache_page+0x12/0x20 [ 242.674592] read_dev_sector+0x7d/0xe0 [ 242.676457] ? get_page_from_freelist+0x891/0xad0 [ 242.679027] read_lba+0x193/0x270 [ 242.680421] ? kmem_cache_alloc_trace+0x181/0x190 [ 242.682573] efi_partition+0xf6/0x840 [ 242.684111] ? string+0x59/0x80 [ 242.685066] ? snprintf+0x49/0x60 [ 242.685904] ? compare_gpts+0x280/0x280 [ 242.688018] check_partition+0x13d/0x210 [ 242.689747] rescan_partitions+0xb8/0x370 [ 242.691810] ? get_device+0x17/0x20 [ 242.693415] ? down_write+0x12/0x40 [ 242.695383] __blkdev_get+0x31f/0x440 [ 242.697039] blkdev_get+0x12a/0x330 [ 242.698949] ? unlock_new_inode+0x49/0x80 [ 242.700687] ? refcount_dec_and_test+0x11/0x20 [ 242.703084] ? kobject_put+0x1f/0x60 [ 242.704304] device_add_disk+0x415/0x4a0 [ 242.704851] ? update_autosuspend+0x51/0x60 [ 242.705884] ? __pm_runtime_use_autosuspend+0x54/0x70 [ 242.707036] sd_probe_async+0x10d/0x1c0 [ 242.707943] async_run_entry_fn+0x37/0x150 [ 242.708510] process_one_work+0x1fc/0x490 [ 242.709388] worker_thread+0x4b/0x500 [ 242.710197] kthread+0x101/0x140 [ 242.710943] ? process_one_work+0x490/0x490 [ 242.711836] ? kthread_create_on_node+0x60/0x60 [ 242.712355] ret_from_fork+0x2c/0x40 [ 242.713177] INFO: task kworker/3:0:29 blocked for more than 120 seconds. [ 242.714447] Not tainted 4.10.0-next-20170228-next+ #4 [ 242.715562] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.716589] kworker/3:0 D 0 29 2 0x00000000 [ 242.733696] Workqueue: events storvsc_remove_lun [hv_storvsc] [ 242.741567] Call Trace: [ 242.742437] __schedule+0x27a/0x890 [ 242.743475] schedule+0x36/0x80 [ 242.744602] schedule_preempt_disabled+0xe/0x10 [ 242.748609] __mutex_lock.isra.5+0x25f/0x4e0 [ 242.764302] ? ttwu_do_wakeup+0x1e/0x150 [ 242.767479] ? refcount_inc+0x9/0x30 [ 242.768992] __mutex_lock_slowpath+0x13/0x20 [ 242.770882] mutex_lock+0x2f/0x40 [ 242.772056] scsi_remove_device+0x1e/0x40 [ 242.773876] storvsc_remove_lun+0x40/0x60 [hv_storvsc] [ 242.776040] process_one_work+0x1fc/0x490 [ 242.777362] worker_thread+0x4b/0x500 [ 242.779144] kthread+0x101/0x140 [ 242.784784] ? process_one_work+0x490/0x490 [ 242.804486] ? kthread_create_on_node+0x60/0x60 [ 242.806958] ret_from_fork+0x2c/0x40 [ 242.808224] INFO: task kworker/u480:1:59 blocked for more than 120 seconds. [ 242.810817] Not tainted 4.10.0-next-20170228-next+ #4 [ 242.829584] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.836883] kworker/u480:1 D 0 59 2 0x00000000 [ 242.839253] Workqueue: events_unbound async_run_entry_fn [ 242.840995] Call Trace: [ 242.842259] __schedule+0x27a/0x890 [ 242.861480] schedule+0x36/0x80 [ 242.866611] io_schedule+0x16/0x40 [ 242.868177] do_read_cache_page+0x400/0x550 [ 242.870012] ? blkdev_writepages+0x40/0x40 [ 242.871621] ? page_cache_tree_insert+0x120/0x120 [ 242.872978] read_cache_page+0x12/0x20 [ 242.882635] read_dev_sector+0x7d/0xe0 [ 242.893398] ? get_page_from_freelist+0x891/0xad0 [ 242.895202] read_lba+0x193/0x270 [ 242.896256] ? kmem_cache_alloc_trace+0x181/0x190 [ 242.897996] efi_partition+0xf6/0x840 [ 242.899471] ? string+0x59/0x80 [ 242.900413] ? snprintf+0x49/0x60 [ 242.901831] ? compare_gpts+0x280/0x280 [ 242.903385] check_partition+0x13d/0x210 [ 242.904510] rescan_partitions+0xb8/0x370 [ 242.921040] ? get_device+0x17/0x20 [ 242.931024] ? down_write+0x12/0x40 [ 242.932395] __blkdev_get+0x31f/0x440 [ 242.933973] blkdev_get+0x12a/0x330 [ 242.935457] ? unlock_new_inode+0x49/0x80 [ 242.936613] ? refcount_dec_and_test+0x11/0x20 [ 242.938422] ? kobject_put+0x1f/0x60 [ 242.939910] device_add_disk+0x415/0x4a0 [ 242.941030] ? update_autosuspend+0x51/0x60 [ 242.942698] ? __pm_runtime_use_autosuspend+0x54/0x70 [ 242.944290] sd_probe_async+0x10d/0x1c0 [ 242.945856] async_run_entry_fn+0x37/0x150 [ 242.947503] process_one_work+0x1fc/0x490 [ 242.948645] worker_thread+0x4b/0x500 [ 242.950155] kthread+0x101/0x140 [ 242.951494] ? process_one_work+0x490/0x490 [ 242.959746] ? kthread_create_on_node+0x60/0x60 [ 242.971264] ret_from_fork+0x2c/0x40 [ 242.972731] INFO: task kworker/3:1:147 blocked for more than 120 seconds. [ 242.975571] Not tainted 4.10.0-next-20170228-next+ #4 [ 242.977499] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.980459] kworker/3:1 D 0 147 2 0x00000000 [ 242.982852] Workqueue: events storvsc_remove_lun [hv_storvsc] [ 243.007498] Call Trace: [ 243.008589] __schedule+0x27a/0x890 [ 243.010330] ? sched_clock_local+0x17/0x90 [ 243.012217] schedule+0x36/0x80 [ 243.013227] schedule_preempt_disabled+0xe/0x10 [ 243.022267] __mutex_lock.isra.5+0x25f/0x4e0 [ 243.034018] ? refcount_inc+0x9/0x30 [ 243.035848] __mutex_lock_slowpath+0x13/0x20 [ 243.037509] mutex_lock+0x2f/0x40 [ 243.039161] scsi_remove_device+0x1e/0x40 [ 243.040721] storvsc_remove_lun+0x40/0x60 [hv_storvsc] [ 243.043025] process_one_work+0x1fc/0x490 [ 243.044450] worker_thread+0x4b/0x500 [ 243.049993] kthread+0x101/0x140 [ 243.068204] ? process_one_work+0x490/0x490 [ 243.070474] ? kthread_create_on_node+0x60/0x60 [ 243.072247] ret_from_fork+0x2c/0x40 [ 243.073796] INFO: task systemd-udevd:211 blocked for more than 120 seconds. [ 243.076235] Not tainted 4.10.0-next-20170228-next+ #4 [ 243.088238] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.095559] systemd-udevd D 0 211 183 0x00000004 [ 243.096795] Call Trace: [ 243.097542] __schedule+0x27a/0x890 [ 243.098444] ? kobject_uevent+0xb/0x10 [ 243.099366] ? mutex_lock+0x12/0x40 [ 243.100459] schedule+0x36/0x80 [ 243.101817] async_synchronize_cookie_domain+0xb5/0x150 [ 243.103808] ? wake_atomic_t_function+0x60/0x60 [ 243.105077] async_synchronize_full+0x17/0x20 [ 243.106912] do_init_module+0xc1/0x200 [ 243.109350] load_module+0x270f/0x2b20 [ 243.130805] ? __symbol_put+0x60/0x60 [ 243.132612] ? security_kernel_post_read_file+0x6b/0x80 [ 243.135096] SYSC_finit_module+0xdf/0x110 [ 243.136353] SyS_finit_module+0xe/0x10 [ 243.137895] entry_SYSCALL_64_fastpath+0x1e/0xad [ 243.139742] RIP: 0033:0x7f85a7efad29 [ 243.157585] RSP: 002b:00007fff1b33bd58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 243.160930] RAX: ffffffffffffffda RBX: 0000564043826230 RCX: 00007f85a7efad29 [ 243.163618] RDX: 0000000000000000 RSI: 00007f85a881ce23 RDI: 000000000000000c [ 243.165849] RBP: 00007f85a881ce23 R08: 0000000000000000 R09: 00007fff1b33c2d0 [ 243.168367] R10: 000000000000000c R11: 0000000000000246 R12: 0000000000000000 [ 243.182797] R13: 00005640438264b0 R14: 0000000000020000 R15: 00005640420a476c [ 243.197192] INFO: task kworker/3:2:330 blocked for more than 120 seconds. [ 243.200767] Not tainted 4.10.0-next-20170228-next+ #4 [ 243.211557] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.225018] kworker/3:2 D 0 330 2 0x00000000 [ 243.227486] Workqueue: events storvsc_remove_lun [hv_storvsc] [ 243.229536] Call Trace: [ 243.230946] __schedule+0x27a/0x890 [ 243.232441] schedule+0x36/0x80 [ 243.242007] schedule_preempt_disabled+0xe/0x10 [ 243.256986] __mutex_lock.isra.5+0x25f/0x4e0 [ 243.259067] ? ttwu_do_wakeup+0x1e/0x150 [ 243.260506] ? refcount_inc+0x9/0x30 [ 243.262139] __mutex_lock_slowpath+0x13/0x20 [ 243.263996] mutex_lock+0x2f/0x40 [ 243.274173] scsi_remove_device+0x1e/0x40 [ 243.292525] storvsc_remove_lun+0x40/0x60 [hv_storvsc] [ 243.294935] process_one_work+0x1fc/0x490 [ 243.307186] worker_thread+0x4b/0x500 [ 243.315333] kthread+0x101/0x140 [ 243.316704] ? process_one_work+0x490/0x490 [ 243.318487] ? kthread_create_on_node+0x60/0x60 [ 243.320348] ret_from_fork+0x2c/0x40 [ 243.321392] INFO: task kworker/3:3:332 blocked for more than 120 seconds. [ 243.324037] Not tainted 4.10.0-next-20170228-next+ #4 [ 243.325888] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.351220] kworker/3:3 D 0 332 2 0x00000000 [ 243.352493] Workqueue: events storvsc_remove_lun [hv_storvsc] [ 243.354732] Call Trace: [ 243.356026] __schedule+0x27a/0x890 [ 243.357162] ? set_next_entity+0xd9/0x220 [ 243.367740] schedule+0x36/0x80 [ 243.377625] schedule_preempt_disabled+0xe/0x10 [ 243.378711] __mutex_lock.isra.5+0x25f/0x4e0 [ 243.379762] ? __schedule+0x282/0x890 [ 243.380418] ? refcount_inc+0x9/0x30 [ 243.382245] __mutex_lock_slowpath+0x13/0x20 [ 243.384329] mutex_lock+0x2f/0x40 [ 243.385475] scsi_remove_device+0x1e/0x40 [ 243.387391] storvsc_remove_lun+0x40/0x60 [hv_storvsc] [ 243.389327] process_one_work+0x1fc/0x490 [ 243.401523] worker_thread+0x4b/0x500 [ 243.413317] kthread+0x101/0x140 [ 243.415295] ? process_one_work+0x490/0x490 [ 243.416763] ? kthread_create_on_node+0x60/0x60 [ 243.418599] ret_from_fork+0x2c/0x40 [ 243.420251] INFO: task kworker/3:4:333 blocked for more than 120 seconds. [ 243.443223] Not tainted 4.10.0-next-20170228-next+ #4 [ 243.445606] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.448643] kworker/3:4 D 0 333 2 0x00000000 [ 243.451139] Workqueue: events storvsc_remove_lun [hv_storvsc] [ 243.474469] Call Trace: [ 243.478194] __schedule+0x27a/0x890 [ 243.479075] schedule+0x36/0x80 [ 243.479887] schedule_preempt_disabled+0xe/0x10 [ 243.480615] __mutex_lock.isra.5+0x25f/0x4e0 [ 243.481664] ? ttwu_do_wakeup+0x1e/0x150 [ 243.484694] ? refcount_inc+0x9/0x30 [ 243.501458] __mutex_lock_slowpath+0x13/0x20 [ 243.504011] mutex_lock+0x2f/0x40 [ 243.505043] scsi_remove_device+0x1e/0x40 [ 243.506673] storvsc_remove_lun+0x40/0x60 [hv_storvsc] [ 243.508303] process_one_work+0x1fc/0x490 [ 243.510060] worker_thread+0x4b/0x500 [ 243.511644] kthread+0x101/0x140 [ 243.512602] ? process_one_work+0x490/0x490 [ 243.514385] ? kthread_create_on_node+0x60/0x60 [ 243.537616] ret_from_fork+0x2c/0x40 [ 243.539497] INFO: task kworker/u480:5:334 blocked for more than 120 seconds. [ 243.541721] Not tainted 4.10.0-next-20170228-next+ #4 [ 243.543885] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.563120] kworker/u480:5 D 0 334 2 0x00000000 [ 243.565760] Workqueue: events_unbound async_run_entry_fn [ 243.568060] Call Trace: [ 243.568945] __schedule+0x27a/0x890 [ 243.570481] schedule+0x36/0x80 [ 243.571918] io_schedule+0x16/0x40 [ 243.573066] do_read_cache_page+0x400/0x550 [ 243.574919] ? blkdev_writepages+0x40/0x40 [ 243.576377] ? page_cache_tree_insert+0x120/0x120 [ 243.578329] read_cache_page+0x12/0x20 [ 243.579980] read_dev_sector+0x7d/0xe0 [ 243.581102] ? get_page_from_freelist+0x891/0xad0 [ 243.592370] read_lba+0x193/0x270 [ 243.605604] ? kmem_cache_alloc_trace+0x181/0x190 [ 243.608277] efi_partition+0xf6/0x840 [ 243.609370] ? string+0x59/0x80 [ 243.610686] ? snprintf+0x49/0x60 [ 243.612146] ? compare_gpts+0x280/0x280 [ 243.613318] check_partition+0x13d/0x210 [ 243.628468] rescan_partitions+0xb8/0x370 [ 243.634925] ? get_device+0x17/0x20 [ 243.636661] ? down_write+0x12/0x40 [ 243.638127] __blkdev_get+0x31f/0x440 [ 243.639533] blkdev_get+0x12a/0x330 [ 243.640455] ? unlock_new_inode+0x49/0x80 [ 243.642030] ? refcount_dec_and_test+0x11/0x20 [ 243.643734] ? kobject_put+0x1f/0x60 [ 243.644684] device_add_disk+0x415/0x4a0 [ 243.658639] ? update_autosuspend+0x51/0x60 [ 243.668143] ? __pm_runtime_use_autosuspend+0x54/0x70 [ 243.670071] sd_probe_async+0x10d/0x1c0 [ 243.671633] async_run_entry_fn+0x37/0x150 [ 243.672712] process_one_work+0x1fc/0x490 [ 243.674370] worker_thread+0x4b/0x500 [ 243.675961] kthread+0x101/0x140 [ 243.699980] ? process_one_work+0x490/0x490 [ 243.701822] ? kthread_create_on_node+0x60/0x60 [ 243.704162] ret_from_fork+0x2c/0x40 [ 243.706396] INFO: task kworker/3:5:335 blocked for more than 120 seconds. [ 243.725149] Not tainted 4.10.0-next-20170228-next+ #4 [ 243.729465] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.732155] kworker/3:5 D 0 335 2 0x00000000 [ 243.734540] Workqueue: events storvsc_remove_lun [hv_storvsc] [ 243.736424] Call Trace: [ 243.737727] __schedule+0x27a/0x890 [ 243.739946] schedule+0x36/0x80 [ 243.762753] schedule_preempt_disabled+0xe/0x10 [ 243.764775] __mutex_lock.isra.5+0x25f/0x4e0 [ 243.766623] ? ttwu_do_wakeup+0x1e/0x150 [ 243.768224] ? refcount_inc+0x9/0x30 [ 243.769242] __mutex_lock_slowpath+0x13/0x20 [ 243.780479] mutex_lock+0x2f/0x40 [ 243.794561] scsi_remove_device+0x1e/0x40 [ 243.797476] storvsc_remove_lun+0x40/0x60 [hv_storvsc] [ 243.799623] process_one_work+0x1fc/0x490 [ 243.815894] worker_thread+0x4b/0x500 [ 243.824624] kthread+0x101/0x140 [ 243.826247] ? process_one_work+0x490/0x490 [ 243.828039] ? kthread_create_on_node+0x60/0x60 [ 243.829398] ret_from_fork+0x2c/0x40
Begin: Loading essential drivers ... done.
Dexuan has reproduced the same problem and discovered that is related to whether virtual DVD is attached to the VM. My VM had empty virtual DVD (offline) from the installation of the ISO. If the DVD device is removed then the VM boots.
This makes the problem less of a catastrophic but we still need to get to root cause.
Quoted 22 lines · On Tue, 28 Feb 2017 22:20:58 -0800 James Bottomley <[email protected]>…
Quoted 12 lines · Stephen Hemminger
[ 1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.352913] inquiry data: 00000000: 00 aa be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.356543] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.359996] inquiry data: 00000020: 00 00 00 00 [ 1.361835] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.361888] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.362307] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srbQuoted 8 lines
status
0x1length 36[ 1.362308] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.362309] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.362309] inquiry data: 00000020: 00 00 00 00 [ 1.377423] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0
Quoted 6 lines
Well, this pinpoints the fault to the block uncopy, I think. The Inquiry data is clearly correct in the page frame, so it's not getting copied to the
scsi_execute()buffer for some reason.James
Why do I see different sense data on good (4.10) versus bad (4.11)
Good 4.10 initial INQUIRY buffer
[ 1.012413] data: 00000000: 00 2e 64 71 db 97 ff ff f0 94 62 96 ff ff ff ff [ 1.012413] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.012414] data: 00000020: 00 00 00 00
Bad 4.11 initial INQUIRY buffer
[ 1.218159] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 [ 1.225654] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 [ 1.242930] data: 00000020: 31 2e 30 20
Is the kmap_atomic looking at the right place?
Quoted 51 lines · Stephen Hemminger
Quoted 29 lines · On Tue, 28 Feb 2017 22:20:58 -0800 James Bottomley <[email protected]>…
Quoted 28 lines · Stephen Hemminger
[ 1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.352913] inquiry data: 00000000: 00 aa be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.356543] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.359996] inquiry data: 00000020: 00 00 00 00 [ 1.361835] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.361888] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.362307] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.362308] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.362309] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.362309] inquiry data: 00000020: 00 00 00 00 [ 1.377423] scsi 1:0:0:1: Direct-AccessQuoted 9 lines
Quoted 1 line
PQ: 0 ANSI: 0Well, this pinpoints the fault to the block uncopy, I think. The Inquiry data is clearly correct in the page frame, so it's not getting
copied to thescsi_execute()buffer for some reason.James
Why do I see different sense data on good (4.10) versus bad (4.11)
Good 4.10 initial INQUIRY buffer
[ 1.012413] data: 00000000: 00 2e 64 71 db 97 ff ff f0 94 62 96 ff ff ff ff [ 1.012413] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.012414] data: 00000020: 00 00 00 00
Quoted 8 lines
Bad 4.11 initial INQUIRY buffer
[ 1.218159] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 [ 1.225654] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 [ 1.242930] data: 00000020: 31 2e 30 20Is the
kmap_atomiclooking at the right place?
Actually, the 4.11 data looks good. You can tell from the string at byte 8. It's rubbish in the 4.10 one and 'Msft ' in the 4.11 one (I assume you just reversed the cut and paste).
These should be the page physical addresses you sent down to the hypervisor, so kmap should work. Perhaps print out the physical page address so we see what we're getting.
James
James Bottomley
maintainerQuoted 70 lines · James Bottomley
Quoted 67 lines · Stephen Hemminger
Quoted 34 lines · On Tue, 28 Feb 2017 22:20:58 -0800 James Bottomley <[email protected]>…
Quoted 33 lines · Stephen Hemminger
[ 1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.352913] inquiry data: 00000000: 00 aa be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.356543] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.359996] inquiry data: 00000020: 00 00 00 00 [ 1.361835] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.361888] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.362307] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.362308] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.362309] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.362309] inquiry data: 00000020: 00 00 00 00 [ 1.377423] scsi 1:0:0:1: Direct-AccessQuoted 9 lines
Quoted 1 line
PQ: 0 ANSI: 0Well, this pinpoints the fault to the block uncopy, I think. The Inquiry data is clearly correct in the page frame, so it's not getting
copied to thescsi_execute()buffer for some reason.James
Why do I see different sense data on good (4.10) versus bad (4.11)
Good 4.10 initial INQUIRY buffer
[ 1.012413] data: 00000000: 00 2e 64 71 db 97 ff ff f0 94 62 96 ff ff ff ff [ 1.012413] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.012414] data: 00000020: 00 00 00 00Bad 4.11 initial INQUIRY buffer
[ 1.218159] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 [ 1.225654] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 [ 1.242930] data: 00000020: 31 2e 30 20Quoted 1 line
Is the
kmap_atomiclooking at the right place?
Quoted 7 lines
Actually, the 4.11 data looks good. You can tell from the string at byte 8. It's rubbish in the 4.10 one and 'Msft ' in the 4.11 one (I assume you just reversed the cut and paste).
These should be the page physical addresses you sent down to the hypervisor, so kmap should work. Perhaps print out the physical page address so we see what we're getting.
Another possible explanation is non zero sg->offset, in which case you might not see the INQUIRY data because you start at the beginning of the page. This shouldn't happen because you specify no alignment override in the driver, so we should start the INQUIRY buffer on a new page and copy the data back to the real buffer, but perhaps that's what changed.
James
Quoted 79 lines · On Wed, 01 Mar 2017 11:20:22 -0800 James Bottomley…
Quoted 70 lines · James Bottomley
Quoted 67 lines · Stephen Hemminger
Quoted 34 lines · On Tue, 28 Feb 2017 22:20:58 -0800 James Bottomley <[email protected]>…
Quoted 33 lines · Stephen Hemminger
[ 1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.352913] inquiry data: 00000000: 00 aa be f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.356543] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.359996] inquiry data: 00000020: 00 00 00 00 [ 1.361835] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.361888] hv_storvsc: IO cmd 0xa0 0x0 0x0 scsi status 0x0 srb status 0x1 length 16 [ 1.362307] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.362308] inquiry data: 00000000: 00 23 34 f1 5c 98 ff ff f0 64 02 89 ff ff ff ff [ 1.362309] inquiry data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.362309] inquiry data: 00000020: 00 00 00 00 [ 1.377423] scsi 1:0:0:1: Direct-AccessQuoted 9 lines
Quoted 1 line
PQ: 0 ANSI: 0Well, this pinpoints the fault to the block uncopy, I think. The Inquiry data is clearly correct in the page frame, so it's not getting
copied to thescsi_execute()buffer for some reason.James
Why do I see different sense data on good (4.10) versus bad (4.11)
Good 4.10 initial INQUIRY buffer
[ 1.012413] data: 00000000: 00 2e 64 71 db 97 ff ff f0 94 62 96 ff ff ff ff [ 1.012413] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.012414] data: 00000020: 00 00 00 00Bad 4.11 initial INQUIRY buffer
[ 1.218159] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 [ 1.225654] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 [ 1.242930] data: 00000020: 31 2e 30 20Quoted 1 line
Is the
kmap_atomiclooking at the right place?Quoted 7 lines
Actually, the 4.11 data looks good. You can tell from the string at byte 8. It's rubbish in the 4.10 one and 'Msft ' in the 4.11 one (I assume you just reversed the cut and paste).
These should be the page physical addresses you sent down to the hypervisor, so kmap should work. Perhaps print out the physical page address so we see what we're getting.
Quoted 6 lines
Another possible explanation is non zero
sg->offset, in which case you might not see the INQUIRY data because you start at the beginning of the page. This shouldn't happen because you specify no alignment override in the driver, so we should start the INQUIRY buffer on a new page and copy the data back to the real buffer, but perhaps that's what changed.
Dumping more data from 4.9, 4.10 and 4.11
Ok here is much better data, wasn't accounting for the offset in the payload
Working 4.10
[ 1.020041] scsi host0: storvsc_host_t [ 1.024998] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.027452] hv_storvsc: payload size 288 count 1 offset 3072 len 36 pfn 0x1f15d0 [ 1.029385] hv_storvsc: sg 0: phys 0x1f15d0000 virt ffff9270b15d0000 offset 0xc00 length 36 [ 1.031720] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 ........Msft [ 1.033846] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 1.036080] data: 00000020: 31 2e 30 20 1.0 [ 1.038249] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 1.040394] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 1.041494] scsi host1: storvsc_host_t [ 1.044683] hv_storvsc: payload size 288 count 1 offset 0 len 255 pfn 0x1f0faf [ 1.046940] hv_storvsc: sg 0: phys 0x1f0faf000 virt ffff9270b0faf000 offset 0x0 length 255 [ 1.048555] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.048556] hv_storvsc: payload size 288 count 1 offset 2816 len 36 pfn 0x1f15d6 [ 1.048557] hv_storvsc: sg 0: phys 0x1f15d6000 virt ffff9270b15d6000 offset 0xb00 length 36 [ 1.048559] data: 00000000: 05 80 00 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 1.048560] data: 00000010: 56 69 72 74 75 61 6c 20 44 56 44 2d 52 4f 4d 20 Virtual DVD-ROM [ 1.048560] data: 00000020: 31 2e 30 20 1.0 [ 1.048590] scsi 1:0:0:0: CD-ROM Msft Virtual DVD-ROM 1.0 PQ: 0 ANSI: 0 [ 1.048920] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.048920] hv_storvsc: payload size 288 count 1 offset 1024 len 36 pfn 0x1f15d7 [ 1.048921] hv_storvsc: sg 0: phys 0x1f15d7000 virt ffff9270b15d7000 offset 0x400 length 36 [ 1.048922] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.048923] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.048923] data: 00000020: 00 00 00 00 .... [ 1.048942] scsi host1: scsi scan: INQUIRY result too short (5), using 36
Broken 4.11
[ 1.487930] scsi host0: storvsc_host_t [ 1.541254] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.545242] hv_storvsc: payload size 288 count 1 offset 768 len 36 pfn 0x1f1196 [ 1.545242] hv_storvsc: sg 0: phys 0x1f1196000 virt ffff9a42f1196000 offset 0x300 length 36 [ 1.545242] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 ........Msft [ 1.545242] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 Virtual Disk [ 1.545242] data: 00000020: 31 2e 30 20 1.0 [ 1.570136] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 1.571001] scsi host1: storvsc_host_t [ 1.608793] hv_storvsc: INQUIRY cmd 0x12 0x1 0x0 scsi status 0x0 srb status 0x1 length 12 [ 1.610316] hv_storvsc: payload size 288 count 1 offset 0 len 255 pfn 0x1f0577 [ 1.611749] hv_storvsc: sg 0: phys 0x1f0577000 virt ffff9a42f0577000 offset 0x0 length 255 [ 1.612788] data: 00000000: 00 00 00 08 00 83 8f b0 b1 b2 ce cf 72 65 61 74 ............reat [ 1.612788] data: 00000010: 65 5f 66 69 6c 65 00 5f 5f 63 72 63 5f 68 69 64 e_file.__crc_hid [ 1.612788] data: 00000020: 5f 72 65 70 6f 72 74 5f 72 61 77 5f 65 76 65 6e _report_raw_even [ 1.612788] data: 00000030: 74 00 76 66 72 65 65 00 75 6e 72 65 67 69 73 74 t.vfree.unregist [ 1.612788] data: 00000040: 65 72 5f 63 68 72 64 65 76 5f 72 65 67 69 6f 6e er_chrdev_region [ 1.612788] data: 00000050: 00 6d 75 74 65 78 5f 75 6e 6c 6f 63 6b 00 68 69 .mutex_unlock.hi [ 1.612788] data: 00000060: 64 5f 64 65 62 75 67 5f 65 78 69 74 00 6b 6d 65 d_debug_exit.kme [ 1.612788] data: 00000070: 6d 64 75 70 00 68 69 64 72 61 77 5f 65 78 69 74 mdup.hidraw_exit [ 1.612788] data: 00000080: 00 5f 5f 67 65 74 5f 75 73 65 72 5f 34 00 70 6f .__get_user_4.po [ 1.612788] data: 00000090: 77 65 72 5f 73 75 70 70 6c 79 5f 70 6f 77 65 72 wer_supply_power [ 1.612788] data: 000000a0: 73 00 64 65 76 69 63 65 5f 64 65 73 74 72 6f 79 s.device_destroy [ 1.612788] data: 000000b0: 00 5f 5f 63 72 63 5f 68 69 64 5f 73 6e 74 6f 33 .__crc_hid_snto3 [ 1.612788] data: 000000c0: 32 00 63 61 6e 63 65 6c 5f 77 6f 72 6b 5f 73 79 2.cancel_work_sy [ 1.612788] data: 000000d0: 6e 63 00 73 65 71 5f 70 72 69 6e 74 66 00 64 6f nc.seq_printf.do [ 1.612788] data: 000000e0: 77 6e 5f 69 6e 74 65 72 72 75 70 74 69 62 6c 65 wn_interruptible [ 1.612788] data: 000000f0: 00 5f 5f 63 72 63 5f 68 69 64 5f 70 61 72 73 .__crc_hid_pars [ 1.649097] hv_storvsc: INQUIRY cmd 0x12 0x1 0x83 scsi status 0x0 srb status 0x1 length 52 [ 1.649097] random: fast init done [ 1.649097] hv_storvsc: payload size 288 count 1 offset 0 len 255 pfn 0x1f0576 [ 1.649097] hv_storvsc: sg 0: phys 0x1f0576000 virt ffff9a42f0576000 offset 0x0 length 255 [ 1.649097] data: 00000000: 00 83 00 30 01 01 00 18 4d 53 46 54 20 20 20 20 ...0....MSFT [ 1.649097] data: 00000010: 43 77 cc 85 5f 19 c2 46 ac 48 c7 33 b9 dd 2d 2a Cw.._..F.H.3..-* [ 1.649097] data: 00000020: 01 03 00 10 60 02 24 80 43 77 cc 85 5f 19 c7 33 ....`.$.Cw.._..3 [ 1.649097] data: 00000030: b9 dd 2d 2a 5f 55 4e 49 51 55 45 5f 49 44 5f 69 ..-*_UNIQUE_ID_i [ 1.649097] data: 00000040: 67 6e 6f 72 65 5f 73 70 65 63 69 61 6c 5f 64 72 gnore_special_dr [ 1.649097] data: 00000050: 69 76 65 72 73 74 79 70 65 31 34 00 5f 5f 70 61 iverstype14.__pa [ 1.649097] data: 00000060: 72 61 6d 5f 69 67 6e 6f 72 65 5f 73 70 65 63 69 ram_ignore_speci [ 1.649097] data: 00000070: 61 6c 5f 64 72 69 76 65 72 73 00 5f 5f 70 61 72 al_drivers.__par [ 1.649097] data: 00000080: 61 6d 5f 73 74 72 5f 69 67 6e 6f 72 65 5f 73 70 am_str_ignore_sp [ 1.649097] data: 00000090: 65 63 69 61 6c 5f 64 72 69 76 65 72 73 00 5f 5f ecial_drivers.__ [ 1.649097] data: 000000a0: 6b 73 79 6d 74 61 62 5f 68 69 64 5f 64 65 62 75 ksymtab_hid_debu [ 1.649097] data: 000000b0: 67 00 5f 5f 6b 73 74 72 74 61 62 5f 68 69 64 5f g.__kstrtab_hid_ [ 1.649097] data: 000000c0: 64 65 62 75 67 00 5f 5f 55 4e 49 51 55 45 5f 49 debug.__UNIQUE_I [ 1.649097] data: 000000d0: 44 5f 64 65 62 75 67 31 33 00 5f 5f 55 4e 49 51 D_debug13.__UNIQ [ 1.649097] data: 000000e0: 55 45 5f 49 44 5f 64 65 62 75 67 74 79 70 65 31 UE_ID_debugtype1 [ 1.649097] data: 000000f0: 32 00 5f 5f 70 61 72 61 6d 5f 64 65 62 75 67 2.__param_debug [ 1.805271] input: Microsoft Vmbus HID-compliant Mouse as /devices/0006:045E:0621.0001/input/input1 [ 1.805350] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [ 1.805351] hv_storvsc: payload size 288 count 1 offset 2304 len 36 pfn 0x1f1988 [ 1.805352] hv_storvsc: sg 0: phys 0x1f1988000 virt ffff9a42f1988000 offset 0x900 length 36 [ 1.805353] data: 00000000: 05 80 00 02 1f 00 00 00 4d 73 66 74 20 20 20 20 ........Msft [ 1.805353] data: 00000010: 56 69 72 74 75 61 6c 20 44 56 44 2d 52 4f 4d 20 Virtual DVD-ROM [ 1.805354] data: 00000020: 31 2e 30 20 1.0 [ 1.805379] scsi 1:0:0:0: CD-ROM Msft Virtual DVD-ROM 1.0 PQ: 0 ANSI: 0 [ 1.812926] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.812927] hv_storvsc: payload size 288 count 1 offset 2816 len 36 pfn 0x1f198b [ 1.812928] hv_storvsc: sg 0: phys 0x1f198b000 virt ffff9a42f198b000 offset 0xb00 length 36 [ 1.812953] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.812953] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.812954] data: 00000020: 00 00 00 00 .... [ 1.813258] scsi host1: scsi scan: INQUIRY result too short (5), using 36 [ 1.813271] scsi 1:0:0:1: Direct-Access PQ: 0 ANSI: 0 [ 1.817903] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.817921] hv_storvsc: payload size 288 count 1 offset 2048 len 36 pfn 0x1f198a [ 1.817932] hv_storvsc: sg 0: phys 0x1f198a000 virt ffff9a42f198a000 offset 0x800 length 36 [ 1.817940] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.817941] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.817941] data: 00000020: 00 00 00 00 ....
The response from offline DVD device is shorter and contains stale data.
James Bottomley
maintainerQuoted 2 lines · Stephen Hemminger
Ok here is much better data, wasn't accounting for the offset in the payload
But now both responses are the same:
Quoted 1 line
Working 4.10
[...]
Quoted 17 lines
[ 1.048920] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.048920] hv_storvsc: payload size 288 count 1 offset 1024 len 36 pfn 0x1f15d7 [ 1.048921] hv_storvsc: sg 0: phys 0x1f15d7000 virt ffff9270b15d7000 offset 0x400 length 36 [ 1.048922] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.048923] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.048923] data: 00000020: 00 00 00 00 .... [ 1.048942] scsi host1: scsi scan: INQUIRY result too short (5),using 36
Broken 4.11
[...]
Quoted 13 lines
[ 1.812926] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0
srb status 0x20 length 36
[ 1.812927] hv_storvsc: payload size 288 count 1 offset 2816 len
36 pfn 0x1f198b
[ 1.812928] hv_storvsc: sg 0: phys 0x1f198b000 virt
ffff9a42f198b000 offset 0xb00 length 36
[ 1.812953] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 ................
[ 1.812953] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 ................
[ 1.812954] data: 00000020: 00 00 00 00
....
[ 1.813258] scsi host1: scsi scan: INQUIRY result too short (5),Quoted 1 line
using 36
Hyper-v is returning a buffer of zeros for INQUIRY to the offline device in both cases ... that means the problem isn't where I thought it was.
James
Quoted 41 lines · On Wed, 01 Mar 2017 15:09:44 -0800 James Bottomley…
Quoted 2 lines · Stephen Hemminger
Ok here is much better data, wasn't accounting for the offset in the payload
But now both responses are the same:
Quoted 1 line
Working 4.10
[...]
Quoted 17 lines
[ 1.048920] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.048920] hv_storvsc: payload size 288 count 1 offset 1024 len 36 pfn 0x1f15d7 [ 1.048921] hv_storvsc: sg 0: phys 0x1f15d7000 virt ffff9270b15d7000 offset 0x400 length 36 [ 1.048922] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.048923] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.048923] data: 00000020: 00 00 00 00 .... [ 1.048942] scsi host1: scsi scan: INQUIRY result too short (5),using 36
Broken 4.11
[...]
Quoted 13 lines
[ 1.812926] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x20 length 36 [ 1.812927] hv_storvsc: payload size 288 count 1 offset 2816 len 36 pfn 0x1f198b [ 1.812928] hv_storvsc: sg 0: phys 0x1f198b000 virt ffff9a42f198b000 offset 0xb00 length 36 [ 1.812953] data: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.812953] data: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 1.812954] data: 00000020: 00 00 00 00 .... [ 1.813258] scsi host1: scsi scan: INQUIRY result too short (5),Quoted 1 line
using 36
Quoted 5 lines
Hyper-v is returning a buffer of zeros for INQUIRY to the offline device in both cases ... that means the problem isn't where I thought it was.
James
Yes. Earlier output wasn't accounting for offsets, new dump code is.
Quoted 5 lines · Stephen Hemminger
Bad 4.11 initial INQUIRY buffer
[ 1.218159] data: 00000000: 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 [ 1.225654] data: 00000010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 [ 1.242930] data: 00000020: 31 2e 30 20
"........Msft Virtual Disk 1.0 ."
in case anybody wondered about what the ascii data was, like I did.
Linus
Quoted 9 lines · On Tue, 28 Feb 2017 15:08:12 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 6 lines · Stephen Hemminger
Fixes ee5242360424 ("scsi: zero per-cmd driver data before each I/O")but that is already in linux-next.
Noticed another place where memset(of the data was being done not the extra bits. Tried this, but didn't fix it either...
Are you using blk-mq or the legacy request code?
I was using legacy, but even with CONFIG_SCSI_MQ_DEFAULT=y the same failure occurs.