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 1273731

Summary: It displays IO error to use "ls" in directory mounted for usb device after guest boot up with "host-usb"
Product: Red Hat Enterprise Linux 7 Reporter: Xujun Ma <xuma>
Component: qemu-kvm-rhevAssignee: Laurent Vivier <lvivier>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: hannsj_uhl, jsuchane, knoel, lvivier, michen, qzhang, sherold, virt-maint, xuma, zhengtli
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-24 10:33:57 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:
Bug Depends On:    
Bug Blocks: 1308609, 1359843    

Description Xujun Ma 2015-10-21 06:42:49 UTC
Description of problem:
It displays IO error to use "ls" in directory mounted for usb device after guest boot up with "host-usb"

Version-Release number of selected component (if applicable):
host:
kernel-3.10.0-325.el7.ppc64le
qemu-kvm-rhev-2.3.0-31.el7.ppc64le
SLOF-20150313-5.gitc89b0df.el7.noarch
guest:
kernel-2.6.32-573.el6.ppc64

How reproducible:
100%


Steps to Reproduce:
1.Plug a usb stick onto the host,and mount it in /mnt.enter /mnt and list files
#mount /dev/sdc1 /mnt
#cd /mnt
#ls
2.Boot up a guest with "host-usb" option to use the usb stick
/usr/libexec/qemu-kvm \
 -m 16G -smp 16 -monitor stdio -qmp tcp::8888,server,nowait  -vnc :25\
 -usbdevice tablet \
 -netdev tap,id=tap0,script=/etc/qemu-ifup \
 -device virtio-net-pci,netdev=tap0,bootindex=3,id=net0,mac=24:be:05:11:92:11 \
 -drive file=sys.qcow2,if=none,id=drive-0-0-0,format=qcow2,cache=none \
 -device virtio-blk-pci,drive=drive-0-0-0,bootindex=0,id=scsi0-0-0-0  \
 -device usb-ehci,id=usbctr \
 -drive file=usb.qcow2,id=usbs1,if=none \
 -drive file=usb1.qcow2,id=usbs2,if=none \
 -device usb-storage,id=storager1,serial,removable=off,drive=usbs1,bootindex=1 \
 -device usb-storage,id=storager2,serial,removable=off,drive=usbs2,bootindex=2 \
 -device usb-host,hostbus=1,hostaddr=2,id=hostdev0 \
 -device virtio-scsi-pci\
 -device scsi-cd,id=scsi-cd1,drive=scsi-cd1-dr,bootindex=4 \
 -drive file=../iso/RHEL-6.7-20150702.0-Server-ppc64-dvd1.iso,if=none,id=scsi-cd1-dr,readonly=on,format=raw,cache=none \

3.list files in /mnt of host
#ls

Actual results:
ls: reading directory .: Input/output error

Expected results:
Don't display any info , just list nothing

Additional info:

the issue doesn't appear on x86 platform

Comment 2 David Gibson 2015-10-22 03:19:45 UTC
Having a device simultaneously mounted by the host and passed through to the guest with usb-host can't possibly work well.  I don't quite see how it is working on x86.

What are the exact steps you ran on x86, and what were the results at each stage?

Comment 3 David Gibson 2015-10-22 03:21:52 UTC
Also, a question for product management.

Are we intending to support usb-host on Power?  I believe the main use case is for Spice, which we're not supporting.

Comment 4 Xujun Ma 2015-10-22 08:41:24 UTC
(In reply to David Gibson from comment #2)
> Having a device simultaneously mounted by the host and passed through to the
> guest with usb-host can't possibly work well.  I don't quite see how it is
> working on x86.

first ,I mount the usb stick on /mnt of host,then enter /mnt and stay here
second,start a guest with "usb-host" for the usb stick.
third,execute "ls"  in the /mnt of host,it displays:ls: reading directory .: Input/output error.
the usb stick is working for guest now ,so it won't list any thing on /mnt of host,but it dispalys io error info on powerpc.it won't display any error info on x86 ,and it just list nothing like in a empty directory.

I filed this bug because I verifyed a similar bug about eject cdrom of guest
https://bugzilla.redhat.com/show_bug.cgi?id=1187471

> 
> What are the exact steps you ran on x86, and what were the results at each
> stage?

the same steps and list nothing like in a empty directory.

Comment 5 Qunfang Zhang 2015-10-23 01:16:06 UTC
Get the needinfo back for David's question in comment 3.

Comment 6 Laurent Vivier 2016-02-24 10:33:57 UTC
As for BZ1187471, this is expected behavior. So, likewise, close as NOTABUG.