Bug 1411092 - 4K virtual drives broken on Windows
Summary: 4K virtual drives broken on Windows
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virtio-win
Version: 7.4
Hardware: All
OS: Windows
Target Milestone: rc
: ---
Assignee: Vadim Rozenfeld
QA Contact: Virtualization Bugs
Depends On: 1410964
TreeView+ depends on / blocked
Reported: 2017-01-08 10:49 UTC by Vadim Rozenfeld
Modified: 2017-08-01 12:55 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The viostor driver stores the wrong value in the driver extension for the last LBA. Consequence: Windows is unable to format 4k-sector virtual disk. Fix: The viostor driver correctly populates the last LBA driver extension field. Result: Windows can work with 4k-sector virtual disks.
Clone Of: 1410964
Last Closed: 2017-08-01 12:55:38 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2341 0 normal SHIPPED_LIVE virtio-win bug fix and enhancement update 2017-08-01 16:52:38 UTC

Description Vadim Rozenfeld 2017-01-08 10:49:37 UTC
+++ This bug was initially created as a clone of Bug #1410964 +++

Description of problem: 
4K virtual drives broken on Windows with virtio-win-0.1-104 and greater. Versions previous to virtio-winl-0.1-104 work fine.

Version-Release number of selected component (if applicable):
4K virtual drives fail to format on Windows with virtio-winl-0.1-104 and greater. Versions previous to virtio-winl-0.1-104 work fine.

How reproducible:
Configure a 4K sector virtio virtual data disk and attempt to format it in any windows guest that supports 4K sector data disks i.e W2K12R2, Windows 10.

Steps to Reproduce:
1. Specify virtual disk as 4K logical and physical sector size in XML
2. Start windows guest
3. Attempt to use the 4K sector disk by first formatting it.

Actual results:
Format fails on 4K sector drives.

Expected results:
Format 4K drives.

Additional info:
The problem is viostor stores the wrong value in the driver extension for the last lba. The driver returns the correct value for last LBA in the read capacity request but inappropriately uses this same value in I/O request bounds checking. As a result, windows fails in formating 4K sector drives. 

qemu info:
2017-01-04 19:41:55.201+0000: starting up libvirt version: 2.0.0, package: 10.el7_3.2 (CentOS BuildSystem <http://bugs.centos.org>, 2016-12-06-19:53:38, c1bm.rdu2.centos.org), qemu version: 1.5.3 (qemu-kvm-1.5.3-126.el7), hostname: xxx
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name b2win -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu Broadwell,+rtm,+hle,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff -m 4096 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 78c1e479-d1a6-46a2-8828-d0fc8c570d3d -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-9-b2win/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -drive file=/mnt/vgsdb/b2_boot/b2w_boot.img,format=raw,if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive if=none,id=drive-ide0-0-1,readonly=on -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive file=/mnt/vgsdb/b2w_data/b2w_data.img,format=raw,if=none,id=drive-virtio-disk1 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1,logical_block_size=4096,physical_block_size=4096 -netdev tap,fd=27,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:d6:f3:59,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc -vga std -global VGA.vgamem_mb=16 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on
char device redirected to /dev/pts/2 (label charserial0)

Comment 3 lijin 2017-01-16 08:26:14 UTC
QE can reproduce this issue according to https://bugzilla.redhat.com/show_bug.cgi?id=1410964#c3

Verify this issue with virtio-win-prewhql-130 on win2012R2,disks can be formatted correctly with 4k logical_block_size.

So this issue has been fixed,change status to verified.

Comment 4 lijin 2017-05-11 05:47:00 UTC
Hi Amnon,

Could you help to ack?


Comment 7 errata-xmlrpc 2017-08-01 12:55:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.