libxl: don't add cache mode for qdisk cdrom drives
PATCH v2 1/1 libxl: don't add cache mode for qdisk cdrom drives
qemu commit 91a097e7 forbids specifying cache mode for empty drives. Attempting to create a domain with an empty qdisk cdrom drive results in
qemu-system-x86_64: -drive if=ide,index=1,readonly=on,media=cdrom,
cache=writeback,id=ide-832: Must specify either driver or file
libxl only allows an empty 'target=' for cdroms. By default, cdroms are readonly (see the 'access' parameter in xl-disk-configuration.txt) and forced to readonly by any tools (e.g. xl) using libxlutil's xlu_disk_parse() function. With cdroms always marked readonly, explicitly specifying the cache mode for cdrom drives can be dropped. The drive's 'readonly=on' option can also be set unconditionally.
---
V2:
Drop explicitly setting cache mode since cdrom devices are readonly.
Unconditionally add 'readonly=on' drive option for cdroms.
tools/libxl/libxl_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxl/libxl_dm.c +2 -2
@@ -1368,8 +1368,8 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,if (disks[i].is_cdrom) { drive =libxl__sprintf (gc, -"if=ide,index=%d,readonly=%s,media=cdrom,cache=writeback,id=ide-%i" , - disk, disks[i].readwrite ?"off" :"on" , dev_number); +"if=ide,index=%d,readonly=on,media=cdrom,id=ide-%i" , + disk, dev_number);if (target_path) drive = libxl__sprintf(gc, "%s,file=%s,format=%s",
Signature · 7 lines
1.8.0.1 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 7 lines · Jim Fehlig
qemu commit
91a097e7forbids specifying cache mode for empty drives. Attempting to create a domain with an empty qdisk cdrom drive results inqemu-system-x86_64: -drive if=ide,index=1,readonly=on,media=cdrom,
cache=writeback,id=ide-832: Must specify either driver or file
We need to fix this one way or another.
Quoted 8 lines
libxl only allows an empty 'target=' for cdroms. By default, cdroms are readonly (see the 'access' parameter in xl-disk-configuration.txt) and forced to readonly by any tools (e.g. xl) using libxlutil's
xlu_disk_parse()function. With cdroms always marked readonly, explicitly specifying the cache mode for cdrom drives can be dropped. The drive's 'readonly=on' option can also be set unconditionally.Signed-off-by Jim Fehlig <[email protected]>
CC Stefano who made the change to use writeback in e9a327bbbcab127625b0917a2780cb3601a81d01 . Also CC Anthony.
Ian, Stefano and Anthony, do you have opinion on this patch?
Quoted 28 lines
---
V2:
Drop explicitly setting cache mode since cdrom devices are readonly.
Unconditionally add 'readonly=on' drive option for cdroms.tools/libxl/libxl_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/libxl/libxl_dm.c +2
-2@@ -1368,8 +1368,8 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,if (disks[i].is_cdrom) { drive =libxl__sprintf (gc, -"if=ide,index=%d,readonly=%s,media=cdrom,cache=writeback,id=ide-%i" , - disk, disks[i].readwrite ?"off" :"on" , dev_number); +"if=ide,index=%d,readonly=on,media=cdrom,id=ide-%i" , + disk, dev_number);if (target_path) drive = libxl__sprintf(gc, "%s,file=%s,format=%s",Signature · 1 line
1.8.0.1
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 18 lines · Wei Liu
Quoted 7 lines · Jim Fehlig
qemu commit
91a097e7forbids specifying cache mode for empty drives. Attempting to create a domain with an empty qdisk cdrom drive results inqemu-system-x86_64: -drive if=ide,index=1,readonly=on,media=cdrom,
cache=writeback,id=ide-832: Must specify either driver or fileWe need to fix this one way or another.
Quoted 7 lines
libxl only allows an empty 'target=' for cdroms. By default, cdroms are readonly (see the 'access' parameter in xl-disk-configuration.txt) and forced to readonly by any tools (e.g. xl) using libxlutil's
xlu_disk_parse()function. With cdroms always marked readonly, explicitly specifying the cache mode for cdrom drives can be dropped. The drive's 'readonly=on' option can also be set unconditionally.
Quoted 6 lines
Quoted 1 line
Signed-off-by Jim Fehlig <[email protected]>CC Stefano who made the change to use writeback in
e9a327bbbcab127625b0917a2780cb3601a81d01. Also CC Anthony.Ian, Stefano and Anthony, do you have opinion on this patch?
It looks good to me. We could consider to backport it, given that we only have a loose relationship with QEMU and older versions of Xen could end up running with newer versions of QEMU.
Quoted 22 lines
Quoted 22 lines
V2:
Drop explicitly setting cache mode since cdrom devices are readonly.
Unconditionally add 'readonly=on' drive option for cdroms.tools/libxl/libxl_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/libxl/libxl_dm.c +2
-2@@ -1368,8 +1368,8 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,if (disks[i].is_cdrom) { drive =libxl__sprintf (gc, -"if=ide,index=%d,readonly=%s,media=cdrom,cache=writeback,id=ide-%i" , - disk, disks[i].readwrite ?"off" :"on" , dev_number); +"if=ide,index=%d,readonly=on,media=cdrom,id=ide-%i" , + disk, dev_number);
Quoted 11 lines
Quoted 5 lines
tools/libxl/libxl_dm.c +0
-0if (target_path) drive = libxl__sprintf(gc, "%s,file=%s,format=%s",Signature · 1 line
1.8.0.1_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 18 lines · Stefano Stabellini
Quoted 17 lines · Wei Liu
Quoted 7 lines · Jim Fehlig
qemu commit
91a097e7forbids specifying cache mode for empty drives. Attempting to create a domain with an empty qdisk cdrom drive results inqemu-system-x86_64: -drive if=ide,index=1,readonly=on,media=cdrom,
cache=writeback,id=ide-832: Must specify either driver or fileWe need to fix this one way or another.
Quoted 7 lines
libxl only allows an empty 'target=' for cdroms. By default, cdroms are readonly (see the 'access' parameter in xl-disk-configuration.txt) and forced to readonly by any tools (e.g. xl) using libxlutil's
xlu_disk_parse()function. With cdroms always marked readonly, explicitly specifying the cache mode for cdrom drives can be dropped. The drive's 'readonly=on' option can also be set unconditionally.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Jim Fehlig <[email protected]>CC Stefano who made the change to use writeback in
e9a327bbbcab127625b0917a2780cb3601a81d01. Also CC Anthony.Ian, Stefano and Anthony, do you have opinion on this patch?
It looks good to me. We could consider to backport it, given that we only have a loose relationship with QEMU and older versions of Xen could end up running with newer versions of QEMU.
Wei,
Will this patch make 4.7? It allows empty cdroms with freshly released QEMU 2.6 :-).
Regards,
Jim
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 23 lines · Jim Fehlig
Quoted 22 lines · Stefano Stabellini
Quoted 21 lines · Wei Liu
Quoted 7 lines · Jim Fehlig
qemu commit
91a097e7forbids specifying cache mode for empty drives. Attempting to create a domain with an empty qdisk cdrom drive results inqemu-system-x86_64: -drive if=ide,index=1,readonly=on,media=cdrom,
cache=writeback,id=ide-832: Must specify either driver or fileWe need to fix this one way or another.
Quoted 8 lines
libxl only allows an empty 'target=' for cdroms. By default, cdroms are readonly (see the 'access' parameter in xl-disk-configuration.txt) and forced to readonly by any tools (e.g. xl) using libxlutil's
xlu_disk_parse()function. With cdroms always marked readonly, explicitly specifying the cache mode for cdrom drives can be dropped. The drive's 'readonly=on' option can also be set unconditionally.Signed-off-by Jim Fehlig <[email protected]>CC Stefano who made the change to use writeback in
e9a327bbbcab127625b0917a2780cb3601a81d01. Also CC Anthony.
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
Ian, Stefano and Anthony, do you have opinion on this patch?
It looks good to me. We could consider to backport it, given that we only have a loose relationship with QEMU and older versions of Xen could end up running with newer versions of QEMU.
Wei,
Will this patch make 4.7? It allows empty cdroms with freshly released QEMU 2.6 :-).
Yes, it's on my radar. I wanted to give some time for other people to look at it.
Now two weeks has passed, I've queued it up for committing.
Wei.
Quoted 3 lines
Regards,
Jim
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel