Bug 1273731 - It displays IO error to use "ls" in directory mounted for usb device after guest boot up with "host-usb"
It displays IO error to use "ls" in directory mounted for usb device after gu...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
ppc64le Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Laurent Vivier
Virtualization Bugs
:
Depends On:
Blocks: RHV4.1PPC RHEV4.0PPC
  Show dependency treegraph
 
Reported: 2015-10-21 02:42 EDT by Xujun Ma
Modified: 2016-07-25 10:18 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-24 05:33:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xujun Ma 2015-10-21 02:42:49 EDT
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-21 23:19:45 EDT
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-21 23:21:52 EDT
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 04:41:24 EDT
(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-22 21:16:06 EDT
Get the needinfo back for David's question in comment 3.
Comment 6 Laurent Vivier 2016-02-24 05:33:57 EST
As for BZ1187471, this is expected behavior. So, likewise, close as NOTABUG.

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