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 1855250 - qemu-img convert uses possibly slow pre-zeroing on block storage
Summary: qemu-img convert uses possibly slow pre-zeroing on block storage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.3
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 8.0
Assignee: Kevin Wolf
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On: 1847192 1861682
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-09 11:04 UTC by Xueqiang Wei
Modified: 2021-12-07 22:45 UTC (History)
14 users (show)

Fixed In Version: qemu-kvm-4.2.0-49.module+el8.5.0+10804+ce89428a
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1847192
Environment:
Last Closed: 2021-11-09 17:58:01 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4191 0 None None None 2021-11-09 17:59:25 UTC

Comment 1 Xueqiang Wei 2020-07-09 11:15:44 UTC
According to https://bugzilla.redhat.com/show_bug.cgi?id=1847192#c17 and https://bugzilla.redhat.com/show_bug.cgi?id=1847192#c18, track the issue for rhel8.3 slow train.


Details as below:


Versions:
kernel-4.18.0-222.el8.x86_64
qemu-kvm-4.2.0-29.module+el8.3.0+7212+401047e6

1. create a 2G iamge
# qemu-img create -f raw test.img 2G
Formatting 'test.img', fmt=raw size=2147483648

2. covert it to full allocation
# qemu-img convert -p -f raw -O raw -S 0 test.img test.img 
    (100.00/100%)
# qemu-img info test.img 
image: test.img
file format: raw
virtual size: 2 GiB (2147483648 bytes)
disk size: 2 GiB

3. create lvm on block device
# pvcreate /dev/mapper/mpatha
# vgcreate vgtest /dev/mapper/mpatha
# lvcreate -L 20G -n lvtest vgtest

4. convert the image to block device
# time qemu-img convert -f raw -O raw -t none -T none -W /home/bug/test.img /dev/vgtest/lvtest -p
    (100.00/100%)

real	14m17.389s
user	0m0.570s
sys	0m0.984s

Comment 2 Richard W.M. Jones 2020-07-09 12:33:13 UTC
This is a nice to have but slow train isn't really a priority since
this bug only slows conversions, doesn't prevent them.  So if the
backport is at all risky I'd say don't do it.

Comment 3 Nir Soffer 2020-07-09 12:45:08 UTC
Also RHV does not depend on slow train, only on RHEL AV.

Michal, can you confirm?

Comment 4 Kevin Wolf 2020-07-09 13:22:16 UTC
(In reply to Richard W.M. Jones from comment #2)
> This is a nice to have but slow train isn't really a priority since
> this bug only slows conversions, doesn't prevent them.  So if the
> backport is at all risky I'd say don't do it.

Indeed. The backport consists of deleting 9 lines, an optimisation that became a pessimisation in newer versions, so I think it's not risky at all. But as I said, I also think this should still wait for 8.3.1 at this point. (Which doesn't seem to be available as ITR yet?)

Comment 5 Ademar Reis 2020-07-14 16:21:31 UTC
(In reply to Kevin Wolf from comment #4)
> (In reply to Richard W.M. Jones from comment #2)
> > This is a nice to have but slow train isn't really a priority since
> > this bug only slows conversions, doesn't prevent them.  So if the
> > backport is at all risky I'd say don't do it.
> 
> Indeed. The backport consists of deleting 9 lines, an optimisation that
> became a pessimisation in newer versions, so I think it's not risky at all.
> But as I said, I also think this should still wait for 8.3.1 at this point.
> (Which doesn't seem to be available as ITR yet?)

There's no RHEL-8.3.1, only RHEL-AV has it (this is an oversimplification, the full story is confusing).

(In reply to Nir Soffer from comment #3)
> Also RHV does not depend on slow train, only on RHEL AV.
> 
> Michal, can you confirm?

I can confirm this is indeed the case.

Kevin: assigned to you with ITR=8.4.0, but from my perspective, you can close it as DEFERRED in RHEL-8 if you like (already fixed in RHEL-AV), as this is a corner-case with a small impact on customers.

Comment 8 Xueqiang Wei 2021-02-09 07:40:53 UTC
Tested it on rhel8.4, hit this issue. 


Versions:
kernel-4.18.0-280.el8.x86_64
qemu-kvm-4.2.0-44.module+el8.4.0+9776+c5744f20


1. create a 2G iamge
# qemu-img create -f raw test.img 2G
Formatting 'test.img', fmt=raw size=2147483648

2. covert it to full allocation
# qemu-img convert -p -f raw -O raw -S 0 test.img test.img 
    (100.00/100%)
# qemu-img info test.img 
image: test.img
file format: raw
virtual size: 2 GiB (2147483648 bytes)
disk size: 2 GiB

3. create lvm on block device
# pvcreate /dev/mapper/mpatha1
# vgcreate vgtest /dev/mapper/mpatha1
# lvcreate -L 20G -n lvtest vgtest

4. convert the image to block device
# time qemu-img convert -f raw -O raw -t none -T none -W /home/test.img /dev/vgtest/lvtest -p
    (100.00/100%)

real	12m46.474s
user	0m0.578s
sys	0m0.389s



Hi Kevin,

this bug is targeted to 8.4.0, if it will be fixed in 8.4.0. Thanks.

Comment 9 Kevin Wolf 2021-02-10 09:46:38 UTC
Thanks for the reminder. Yes, I will send a backport of the fix.

Comment 15 Xueqiang Wei 2021-03-15 09:39:46 UTC
Tested it with qemu-kvm-4.2.0-47.module+el8.4.0+10269+f1e44e42, also hit this issue. 


Versions:
kernel-4.18.0-295.el8.x86_64
qemu-kvm-4.2.0-47.module+el8.4.0+10269+f1e44e42


1. create a 2G iamge
# qemu-img create -f raw test.img 2G
Formatting 'test.img', fmt=raw size=2147483648

2. covert it to full allocation
# qemu-img convert -p -f raw -O raw -S 0 test.img test.img 
    (100.00/100%)
# qemu-img info test.img 
image: test.img
file format: raw
virtual size: 2 GiB (2147483648 bytes)
disk size: 2 GiB

3. create lvm on block device
# pvcreate /dev/mapper/mpatha
# vgcreate vgtest /dev/mapper/mpatha
# lvcreate -L 20G -n lvtest vgtest

4. convert the image to block device
# time qemu-img convert -f raw -O raw -t none -T none -W /home/test.img /dev/vgtest/lvtest -p
    (100.00/100%)

real	12m39.073s
user	0m0.589s
sys	0m0.399s

Comment 18 Danilo de Paula 2021-03-16 19:37:41 UTC
I don't expect a rebase for 8.5 AFAIK.
So the code base is still the same. In that way I will just move your patches (and acks) to the new queue when it opens. You won't need to do anything if we're settle that this will go to 8.5.

Meanwhile, are you sure this doesn't deserve an exception?

ps: I will move it back to POST given that I will just move your patches to the new queue when it opens.

Comment 19 Kevin Wolf 2021-03-17 09:23:17 UTC
Since initially we were even discussing if this is worth fixing at all in base RHEL, I don't think I could justify an exception.

Comment 20 Danilo de Paula 2021-04-21 04:09:57 UTC
The patch to fix this BZ got moved into RHEL-8.5, however it's not ready for release as it's missing ITM

Please DEVEL AND QE agree into an ITM.

Comment 21 Kevin Wolf 2021-04-21 10:13:27 UTC
I think it would make more sense for you to set it for the devel side because the patch is fully reviewed and it only depends on when it actually gets built. I'll just take a guess and set something relatively soon, but everyone, please feel free to modify it.

Comment 22 Xueqiang Wei 2021-04-21 14:39:10 UTC
I agree with Kevin, set ITM to 11. It will be verified soon If QE gets the package.

Comment 24 Yanan Fu 2021-04-29 06:04:20 UTC
Set Verified:Tested,SanityOnly as gating/tier1 test pass.

Comment 28 Xueqiang Wei 2021-05-06 03:04:12 UTC
Tested it with qemu-kvm-4.2.0-49.module+el8.5.0+10804+ce89428a, not hit this issue. So set status to VERIFIED.


Versions:
kernel-4.18.0-305.1.el8.x86_64
qemu-kvm-4.2.0-49.module+el8.5.0+10804+ce89428a


1. create a 2G iamge
# qemu-img create -f raw test.img 2G
Formatting 'test.img', fmt=raw size=2147483648

2. covert it to full allocation
# qemu-img convert -p -f raw -O raw -S 0 test.img test.img 
    (100.00/100%)
# qemu-img info test.img 
image: test.img
file format: raw
virtual size: 2 GiB (2147483648 bytes)
disk size: 2 GiB

3. create lvm on block device
# pvcreate /dev/mapper/mpatha
# vgcreate vgtest /dev/mapper/mpatha
# lvcreate -L 20G -n lvtest vgtest

4. convert the image to block device
# time qemu-img convert -f raw -O raw -t none -T none -W /home/test.img /dev/vgtest/lvtest -p
    (100.00/100%)

real	0m18.845s
user	0m0.657s
sys	0m0.555s

Comment 30 errata-xmlrpc 2021-11-09 17:58:01 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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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/RHSA-2021:4191


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