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 1860292 - RFE: add extent_size_hint information to qemu-img info
Summary: RFE: add extent_size_hint information to qemu-img info
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Hanna Czenczek
QA Contact: aihua liang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-24 09:23 UTC by Xueqiang Wei
Modified: 2023-05-25 02:29 UTC (History)
14 users (show)

Fixed In Version: qemu-kvm-7.2.0-8.el9
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:19:27 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/src qemu-kvm merge_requests 145 0 None opened Show protocol-level information in qemu-img info 2023-02-06 15:56:00 UTC
Red Hat Product Errata RHSA-2023:2162 0 None None None 2023-05-09 07:19:56 UTC

Description Xueqiang Wei 2020-07-24 09:23:35 UTC
Description of problem:

According to https://bugzilla.redhat.com/show_bug.cgi?id=1850660#c49, the parameter extent_size_hint is introduced from QEMU 5.1, in order to mitigate file fragmentation.

It's set when image creation. 1 MB is the default in QEMU 5.1.
# qemu-img create -f raw -o extent_size_hint=1M test.raw 10G


But the extent_size_hint message is not in qemu-img info.
Discussed it with Kevin, it's better to add the information to qemu-img info.



Version-Release number of selected component (if applicable):
kernel-4.18.0-224.el8.x86_64
qemu-kvm-5.1.0-0.scrmod+el8.3.0+7384+2e5aeafb.wrb200716


How reproducible:
100%

Steps to Reproduce:
1. create an image
# qemu-img create -f raw test.raw 10G

2. check the extent_size_hint information in qemu-img info
# qemu-img info test.raw --output=json


Actual results:
after step 2, can't find it in qemu-img info
# qemu-img info test.raw --output=json
{
    "virtual-size": 10737418240,
    "filename": "test.raw",
    "format": "raw",
    "actual-size": 8192733184,
    "dirty-flag": false
}


Expected results:
Displaying it in qemu-img info



Additional info:

Comment 5 John Ferlan 2021-09-08 21:38:40 UTC
Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release.

Comment 7 RHEL Program Management 2022-01-24 07:27:04 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 8 Tingting Mao 2022-01-25 03:27:52 UTC
Hi Kevin,

Could you please kindly handle this? Thanks.

Comment 11 Klaus Heinrich Kiwi 2022-03-24 10:35:03 UTC
Kevin, we discussed this as part of our planning, can we try to schedule it for 9.2.0 (i.e., Qemu 7.2)? 

Hanna: do you think you could take this?

Comment 12 Hanna Czenczek 2022-03-24 10:47:33 UTC
I don’t see why not.

Comment 13 Klaus Heinrich Kiwi 2022-03-24 13:16:27 UTC
I guess we can safely clear needinfos and set ITR then. 

Thanks!

Comment 14 Hanna Czenczek 2022-06-09 10:45:23 UTC
Removing the EasyFix tag, because we had some discussion upstream (https://lists.nongnu.org/archive/html/qemu-block/2022-05/msg00062.html), and so given I don’t see one obvious way to implement this, I wouldn’t call it an easy problem to solve.

Comment 16 Hanna Czenczek 2022-07-07 07:05:43 UTC
Advancing stale date by half a year.  There are patches upstream (https://lists.nongnu.org/archive/html/qemu-block/2022-06/msg00466.html).

Comment 17 Klaus Heinrich Kiwi 2022-08-15 17:38:06 UTC
(In reply to Hanna Reitz from comment #16)
> Advancing stale date by half a year.  There are patches upstream
> (https://lists.nongnu.org/archive/html/qemu-block/2022-06/msg00466.html).

Any updates on the upstream acceptance for said patches? If they are upstream, I suggest we make this BZ "testonly" and make it dependent on a RHEL 9.2 Qemu rebase bz (in case there is one, otherwise we can ask Mirek / John Ferlan for one).

Comment 18 Hanna Czenczek 2022-08-16 06:02:14 UTC
No, no updates yet.

Comment 19 Hanna Czenczek 2023-01-05 14:08:15 UTC
Current status: The patches mentioned in comment 16 are still current, I’ve pinged them on Dec 8 (https://lists.nongnu.org/archive/html/qemu-devel/2022-12/msg01067.html).  Advancing stale date further.

Comment 26 aihua liang 2023-02-10 10:09:56 UTC
Test on qemu-kvm-7.2.0-8.el9,extent_size_hint can display correctly in qemu-img info xxx.

For qcow2 image:
 1.Create a qcow2 image with extent_size_hint=3.5G
   #qemu-img create -f qcow2 test.img 100G -o extent_size_hint=3.5G
Formatting 'test.img', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=107374182400 lazy_refcounts=off refcount_bits=16 extent_size_hint=3758096384
   #qemu-img info test.img 
image: test.img
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 196 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: test.img
    protocol type: file
    file length: 194 KiB (198656 bytes)
    disk size: 196 KiB
    Format specific information:
        extent size hint: 3758096384

 2.Create a qcow2 image with extent_size_hint=0
   #qemu-img create -f qcow2 test.img 100G -o extent_size_hint=0
Formatting 'test.img', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=107374182400 lazy_refcounts=off refcount_bits=16 extent_size_hint=0
   #qemu-img info test.img 
image: test.img
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 196 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: test.img
    protocol type: file
    file length: 194 KiB (198656 bytes)
    disk size: 196 KiB

 3.Create a qcow2 image without extent_size_hint
   #qemu-img create -f qcow2 test.img 100G
Formatting 'test.img', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=107374182400 lazy_refcounts=off refcount_bits=16
   #qemu-img info test.img
image: test.img
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 196 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: test.img
    protocol type: file
    file length: 194 KiB (198656 bytes)
    disk size: 196 KiB
    Format specific information:
        extent size hint: 1048576

For raw image:
 1.Create a raw image with extent_size_hint=3.5G
   #qemu-img create -f raw test.img 100G -o extent_size_hint=3.5G
Formatting 'test.img', fmt=raw size=107374182400 extent_size_hint=3758096384
   #qemu-img info test.img 
image: test.img
file format: raw
virtual size: 100 GiB (107374182400 bytes)
disk size: 3.5 GiB
Child node '/file':
    filename: test.img
    protocol type: file
    file length: 100 GiB (107374182400 bytes)
    disk size: 3.5 GiB
    Format specific information:
        extent size hint: 3758096384

 2.Create a raw image with extent_size_hint=0
   #qemu-img create -f raw test.img 100G -o extent_size_hint=0
Formatting 'test.img', fmt=raw size=107374182400 extent_size_hint=0
   #qemu-img info test.img 
image: test.img
file format: raw
virtual size: 100 GiB (107374182400 bytes)
disk size: 4 KiB
Child node '/file':
    filename: test.img
    protocol type: file
    file length: 100 GiB (107374182400 bytes)
    disk size: 4 KiB
 
 3. Create raw image without extent_size_hint
    # qemu-img create -f raw test.img 100G
Formatting 'test.img', fmt=raw size=107374182400
    # qemu-img info test.img 
image: test.img
file format: raw
virtual size: 100 GiB (107374182400 bytes)
disk size: 1 MiB
Child node '/file':
    filename: test.img
    protocol type: file
    file length: 100 GiB (107374182400 bytes)
    disk size: 1 MiB
    Format specific information:
        extent size hint: 1048576
 4. Create a small size raw image with large extent_size_hint.
    # qemu-img create -f raw test.img 1G -o extent_size_hint=3.5G
Formatting 'test.img', fmt=raw size=1073741824 extent_size_hint=3758096384
    # qemu-img info test.img 
image: test.img
file format: raw
virtual size: 1 GiB (1073741824 bytes)
disk size: 1 GiB
Child node '/file':
    filename: test.img
    protocol type: file
    file length: 1 GiB (1073741824 bytes)
    disk size: 1 GiB
    Format specific information:
        extent size hint: 3758096384

Comment 27 Yanan Fu 2023-02-13 08:55:15 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 30 aihua liang 2023-02-14 07:54:35 UTC
As comment 26 and comment 27, set bug's status to "VERIFIED".

Comment 32 errata-xmlrpc 2023-05-09 07:19:27 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: qemu-kvm 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-2023:2162


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