Bug 920096

Summary: Add support cache=none to -drive for scsi-generic device in rhel7
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chayang, flang, juzhang, kwolf, lsu, michen, pbonzini, qzhang, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-29 17:03:10 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:

Description Sibiao Luo 2013-03-11 10:52:52 UTC
Description of problem:
Just as discus with Paolo in IRC, we should add support cache=none to -drive for scsi-generic device in rhel7 as libvirt supports cache="".
If i boot guest with the cache=none for scsi-generic drive, it will fail to boot up. btw, the "writeback", "unsafe", "directsync" and "writethrough" is ok for cache value of scsi-generic drive. 

Version-Release number of selected component (if applicable):
host info:
kernel-3.8.0-0.40.el7.x86_64
qemu-kvm-1.4.0-1.el7.x86_64
guest info:
kernel-3.8.0-0.40.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with scsi-generic adding cache=none.
e.g:...-drive file=/dev/sg2,if=none,id=drive-data-disk,format=raw,cache=none,aio=native -device virtio-scsi-pci,id=scsi1,addr=0x5 -device scsi-generic,bus=scsi1.0,drive=drive-data-disk,id=data-disk 
2.
3.
  
Actual results:
after step 1, it will fail to boot up and qemu prompt like:
qemu-kvm: -drive file=/dev/sg2,if=none,id=drive-data-disk,format=raw,cache=none,aio=native: could not open disk image /dev/sg2: Invalid argument

Expected results:
we should add support for cache=none to scsi-generic.

Additional info:

Comment 1 Paolo Bonzini 2013-04-29 17:03:10 UTC
The libvirt patches for scsi-generic do not provide a way to specify the cache= argument, which makes sense since scsi-generic is really always behaving as if you specified cache=none.  I'm closing this bug.