Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1442322

Summary: [virtio-win][viostor]Cannot enlarge/shrink disk with virtio-blk-pci device.
Product: Red Hat Enterprise Linux 7 Reporter: xiagao
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
virtio-win sub component: virtio-win-prewhql QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: ailan, lijin, lprosek, michen, peliu, phou, wyu
Version: 7.4Keywords: Regression
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 12:58:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xiagao 2017-04-14 05:33:18 UTC
Description of problem:
Cannot enlarge/shrink disk with virtio block device
Guest OS: win2016/win10-32/win8-32/win7-32, other guest should be the same problem.

Version-Release number of selected component (if applicable):
kernel-tools-3.10.0-619.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64
seabios-bin-1.10.2-1.el7.noarch
virtio-win-prewhql-135

How reproducible:
100%

Steps to Reproduce:
1. boot with command line
/usr/libexec/qemu-kvm \
-name 'win10-32-blk' \
-nodefaults  \
-vga std \
-m 3G  \
-smp 4,cores=4  \
-usb -device usb-tablet \
-object iothread,id=thread0 \
-drive file=win10-32.raw,if=none,id=drive-virtio-SYS,format=raw,serial=mike_cao1,cache=none -device virtio-blk-pci,iothread=thread0,bus=pci.0,drive=drive-virtio-SYS,id=virtio-SYS \
-drive file=en_windows_10_enterprise_version_1607_updated_jul_2016_x86_dvd_9060097.iso,if=none,readonly=on,media=cdrom,format=raw,id=cdrom1 -device ide-drive,drive=cdrom1,bus=ide.0,unit=1,id=ide-cd1 \
-drive file=virtio-win-prewhql-135.iso,if=none,readonly=on,media=cdrom,format=raw,id=cdrom2 -device ide-drive,drive=cdrom2,bus=ide.1,unit=0,id=ide-cd2 \
-vnc :9  \
-rtc base=localtime,clock=host,driftfix=slew  \
-boot order=cd,menu=on \
-enable-kvm \
-monitor stdio \
-qmp tcp:0:1239,server,nowait \
-netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0 \
-device e1000,netdev=hostnet0,id=net0,mac=00:52:0a:5c:f1:1c \
-drive file=test.raw,if=none,id=drive-virtio-disk0,format=raw,serial=mike_cao,cache=none -device virtio-blk-pci,iothread=thread0,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0 

2. enlarge the data disk of block device
{"execute":"block_resize","arguments":{"device":"drive-virtio-disk0","size":21474836480 }}

3. re-scan the disk on guest disk manager

Actual results:
The disk size did not change.

Expected results:
disk size should change to 20G

Additional info:

1. can't reproduce in virtio-win-prewhql-130
2. reproduced it from virtio-win-prewhql-131
3. after disable/enable the device, the disk size can change on disk manager.

Comment 2 xiagao 2017-04-14 05:38:54 UTC
other info:
The disk image is checked with "qemu-img info test.raw" ,it is changed.
The block is checked with "query-block" in qmp, it is changed.

Comment 4 Ladi Prosek 2017-04-18 14:49:15 UTC
This was introduced in:

  commit 22b16fa580df278798b7eba7d6dfad5be3f896da
  Author: Vadim Rozenfeld <vrozenfe>
  Date:   Fri Dec 2 19:54:48 2016 +1100

      first mq working code

which changed vdev_get_msix_vector so it no longer returns vector 0 for the device-config-change interrupt.


We had this bug before, see:

  commit a802a2548e249068775d2a29aed22f023f44aede
  Author: Ladi Prosek <lprosek>
  Date:   Mon May 16 09:59:54 2016 +0200

      viostor: Set up device config MSI interrupt
    
      This commit fixes a regression introduced in commit dd7e0ed
      where the hard-coded MSI vector 0 for config change interrupt
      was not correctly ported over to the new code.
    
      The bug manifests as the driver not refreshing disk geometry
      after the virtual disk has been resized.

Comment 5 Vadim Rozenfeld 2017-04-19 05:27:00 UTC
(In reply to Ladi Prosek from comment #4)
> This was introduced in:
> 
>   commit 22b16fa580df278798b7eba7d6dfad5be3f896da
>   Author: Vadim Rozenfeld <vrozenfe>
>   Date:   Fri Dec 2 19:54:48 2016 +1100
> 
>       first mq working code
> 
> which changed vdev_get_msix_vector so it no longer returns vector 0 for the
> device-config-change interrupt.
> 
> 
> We had this bug before, see:
> 
>   commit a802a2548e249068775d2a29aed22f023f44aede
>   Author: Ladi Prosek <lprosek>
>   Date:   Mon May 16 09:59:54 2016 +0200
> 
>       viostor: Set up device config MSI interrupt
>     
>       This commit fixes a regression introduced in commit dd7e0ed
>       where the hard-coded MSI vector 0 for config change interrupt
>       was not correctly ported over to the new code.
>     
>       The bug manifests as the driver not refreshing disk geometry
>       after the virtual disk has been resized.

Yes. that's it. 
Thank you for looking the problem.
Vadim.

Comment 6 Ladi Prosek 2017-04-19 06:03:06 UTC
So you just applied a802a2548e249068775d2a29aed22f023f44aede to current head again? Didn't you want to configure the device with one MSI vector per queue? Now you only use two vectors, 0 for config and (adaptExt->msix_vectors - 1) for all queues.

Also, please submit fixes upstream so they can get proper review.

Comment 7 Vadim Rozenfeld 2017-04-30 21:41:35 UTC
please give a try to build 136
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=554378

Thanks,
Vadim.

Comment 8 lijin 2017-05-02 03:15:09 UTC
Try with build136,disk can be enlarge and shrink correctly.
So this issue is fixed,change status to verified.
Thanks

Comment 9 Ladi Prosek 2017-05-16 09:12:18 UTC
Li Jin, can you please try reproducing this bug with vectors=1 ?

  -device virtio-blk-pci, ..., vectors=1

I can't resize the disk with this command line and suspect that it worked in 7.3. Thanks!

Comment 10 Yu Wang 2017-05-16 10:24:23 UTC
Hi Ladi,

(In reply to Ladi Prosek from comment #9)
> Li Jin, can you please try reproducing this bug with vectors=1 ?
> 
>   -device virtio-blk-pci, ..., vectors=1
> 
> I can't resize the disk with this command line and suspect that it worked in
> 7.3. Thanks!

I can reproduce this with build 136 (w/ vectors=1), I can't resize the disk with this command

when install 7.3 release driver(build 126),it seems worse, I cannot find the disk w/ vectors=1 in disk manager

Thanks
Yu Wang

Comment 11 Ladi Prosek 2017-05-16 11:07:25 UTC
Hi Yu Wang,

(In reply to Yu Wang from comment #10)
> Hi Ladi,
> 
> (In reply to Ladi Prosek from comment #9)
> > Li Jin, can you please try reproducing this bug with vectors=1 ?
> > 
> >   -device virtio-blk-pci, ..., vectors=1
> > 
> > I can't resize the disk with this command line and suspect that it worked in
> > 7.3. Thanks!
> 
> I can reproduce this with build 136 (w/ vectors=1), I can't resize the disk
> with this command
> 
> when install 7.3 release driver(build 126),it seems worse, I cannot find the
> disk w/ vectors=1 in disk manager

Thank you for the quick response. Maybe we don't have to treat it as a 7.4 blocker then if it's not a regression. Thanks!

Comment 12 Yu Wang 2017-05-17 05:33:52 UTC
(In reply to Ladi Prosek from comment #11)
> Hi Yu Wang,
> 
> (In reply to Yu Wang from comment #10)
> > Hi Ladi,
> > 
> > (In reply to Ladi Prosek from comment #9)
> > > Li Jin, can you please try reproducing this bug with vectors=1 ?
> > > 
> > >   -device virtio-blk-pci, ..., vectors=1
> > > 
> > > I can't resize the disk with this command line and suspect that it worked in
> > > 7.3. Thanks!
> > 
> > I can reproduce this with build 136 (w/ vectors=1), I can't resize the disk
> > with this command
> > 
> > when install 7.3 release driver(build 126),it seems worse, I cannot find the
> > disk w/ vectors=1 in disk manager
> 
> Thank you for the quick response. Maybe we don't have to treat it as a 7.4
> blocker then if it's not a regression. Thanks!

Yes, Ladi, I filed a new bug to track this, Bug 1451572 - [virtio-win][viostor] can not resize the disk with "-device virtio-blk-pci, ..., vectors=1". 

Thanks
Yu Wang

Comment 13 Vadim Rozenfeld 2017-05-17 05:46:19 UTC
(In reply to Ladi Prosek from comment #11)
> Hi Yu Wang,
> 
> (In reply to Yu Wang from comment #10)
> > Hi Ladi,
> > 
> > (In reply to Ladi Prosek from comment #9)
> > > Li Jin, can you please try reproducing this bug with vectors=1 ?
> > > 
> > >   -device virtio-blk-pci, ..., vectors=1
> > > 
> > > I can't resize the disk with this command line and suspect that it worked in
> > > 7.3. Thanks!
> > 
> > I can reproduce this with build 136 (w/ vectors=1), I can't resize the disk
> > with this command
> > 
> > when install 7.3 release driver(build 126),it seems worse, I cannot find the
> > disk w/ vectors=1 in disk manager
> 
> Thank you for the quick response. Maybe we don't have to treat it as a 7.4
> blocker then if it's not a regression. Thanks!

Inability to deliver TWO different messages with ONE vector is neither regression, nor test blocker. If a PCI device reports one vector when it needs two - it is a broken or malfunctioned HW which needs to be fixed or replaced. To me "victors=1" is a kind of test case to see that the driver rather than fail down, still can provide some basic functionality. However this scenario is far away from being a normal operation mode for the driver and the system itself.

Comment 14 lijin 2017-05-17 06:35:31 UTC
(In reply to Vadim Rozenfeld from comment #13)
> (In reply to Ladi Prosek from comment #11)
> > Hi Yu Wang,
> > 
> > (In reply to Yu Wang from comment #10)
> > > Hi Ladi,
> > > 
> > > (In reply to Ladi Prosek from comment #9)
> > > > Li Jin, can you please try reproducing this bug with vectors=1 ?
> > > > 
> > > >   -device virtio-blk-pci, ..., vectors=1
> > > > 
> > > > I can't resize the disk with this command line and suspect that it worked in
> > > > 7.3. Thanks!
> > > 
> > > I can reproduce this with build 136 (w/ vectors=1), I can't resize the disk
> > > with this command
> > > 
> > > when install 7.3 release driver(build 126),it seems worse, I cannot find the
> > > disk w/ vectors=1 in disk manager
> > 
> > Thank you for the quick response. Maybe we don't have to treat it as a 7.4
> > blocker then if it's not a regression. Thanks!
> 
> Inability to deliver TWO different messages with ONE vector is neither
> regression, nor test blocker. If a PCI device reports one vector when it
> needs two - it is a broken or malfunctioned HW which needs to be fixed or
> replaced. To me "victors=1" is a kind of test case to see that the driver
> rather than fail down, still can provide some basic functionality. However
> this scenario is far away from being a normal operation mode for the driver
> and the system itself.

So let's mark this bug as verified and still ship build136 for rhel7.4.
bz1451572 will track the vector=1 issue.

Vadim,Ladi,
Do you agree?

Comment 15 Ladi Prosek 2017-05-17 06:40:36 UTC
(In reply to lijin from comment #14)
> So let's mark this bug as verified and still ship build136 for rhel7.4.
> bz1451572 will track the vector=1 issue.
> 
> Vadim,Ladi,
> Do you agree?

Fine with me, thanks!

Comment 16 Vadim Rozenfeld 2017-05-17 07:53:30 UTC
(In reply to lijin from comment #14)
> (In reply to Vadim Rozenfeld from comment #13)
> > (In reply to Ladi Prosek from comment #11)
> > > Hi Yu Wang,
> > > 
> > > (In reply to Yu Wang from comment #10)
> > > > Hi Ladi,
> > > > 
> > > > (In reply to Ladi Prosek from comment #9)
> > > > > Li Jin, can you please try reproducing this bug with vectors=1 ?
> > > > > 
> > > > >   -device virtio-blk-pci, ..., vectors=1
> > > > > 
> > > > > I can't resize the disk with this command line and suspect that it worked in
> > > > > 7.3. Thanks!
> > > > 
> > > > I can reproduce this with build 136 (w/ vectors=1), I can't resize the disk
> > > > with this command
> > > > 
> > > > when install 7.3 release driver(build 126),it seems worse, I cannot find the
> > > > disk w/ vectors=1 in disk manager
> > > 
> > > Thank you for the quick response. Maybe we don't have to treat it as a 7.4
> > > blocker then if it's not a regression. Thanks!
> > 
> > Inability to deliver TWO different messages with ONE vector is neither
> > regression, nor test blocker. If a PCI device reports one vector when it
> > needs two - it is a broken or malfunctioned HW which needs to be fixed or
> > replaced. To me "victors=1" is a kind of test case to see that the driver
> > rather than fail down, still can provide some basic functionality. However
> > this scenario is far away from being a normal operation mode for the driver
> > and the system itself.
> 
> So let's mark this bug as verified and still ship build136 for rhel7.4.

Sure.

> bz1451572 will track the vector=1 issue.
> 
> Vadim,Ladi,
> Do you agree?

Comment 19 errata-xmlrpc 2017-08-01 12:58:08 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.

https://access.redhat.com/errata/RHBA-2017:2341