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 1079383 - "qemu-img map" not supported on NFS
Summary: "qemu-img map" not supported on NFS
Keywords:
Status: CLOSED DUPLICATE of bug 1160237
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Hanna Czenczek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1079385
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-21 14:01 UTC by FuXiangChun
Modified: 2014-11-21 15:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1079385 (view as bug list)
Environment:
Last Closed: 2014-11-21 15:00:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description FuXiangChun 2014-03-21 14:01:00 UTC
Description of problem:
As subject, If guest image is on NFS, discard will be invalid.

Version-Release number of selected component (if applicable):
# uname -r
3.10.0-112.el7.x86_64
qemu-kvm-rhev-1.5.3-53.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest and attached a data disk on NFS(/mnt/ss.raw) and enable discard

/usr/libexec/qemu-kvm -M pc -cpu Opteron_G1 -device virtio-scsi-pci,id=scsi2,indirect_desc=off,event_idx=off,bus=pci.0,addr=0x8 -drive file=/mnt/ss.raw,if=none,id=drive-hd-disk-3,media=disk,format=raw,cache=none,werror=stop,rerror=stop,discard=on -device scsi-hd,drive=drive-hd-disk-3,id=scsi_disk3 -vnc :1  -drive file=/mnt/RHEL-Server-7.0-64.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,media=disk,discard=on,serial,copy-on-read=on,snapshot=on -device virtio-blk-pci,vectors=0,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bus=pci.0,addr=0x7,bootindex=1

2.format data disk inside guest with ext4
#mkfs.ext4 /dev/sda
#mount /dev/sda /mnt
#dd if=/dev/urandom of=/mnt/test 

3.check data disk image in host
# qemu-img map --output=json /mnt/ss.raw 

Actual results:
{ "start": 0, "length": 20971520, "depth": 0, "zero": false, "data": true, "offset": 0}]

Expected results:
discard valib

Additional info:
If data disk image is on local(not NFS), then discard works well

Comment 1 Paolo Bonzini 2014-03-21 14:16:44 UTC
The problem in QEMU is that we only try FIEMAP.  The upstream proposed patches for NFS (http://thread.gmane.org/gmane.linux.nfs/59563) would use SEEK_HOLE/SEEK_DATA instead.

QEMU has code for SEEK_HOLE/SEEK_DATA, but it is not active if the OS (as is the case with Linux) supports FIEMAP.  Instead, QEMU should fall back to SEEK_HOLE/SEEK_DATA if FIEMAP fails.

Comment 7 Hanna Czenczek 2014-11-21 15:00:13 UTC
Hi,

from the QEMU side of things, this bug can be closed. The backport for BZ 1160237 completely removes FIEMAP from QEMU, and makes it use SEEK_HOLE/SEEK_DATA only.

Max

*** This bug has been marked as a duplicate of bug 1160237 ***


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