diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-08-12 22:12:20 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-08-13 11:03:02 +0100 |
commit | d082a76d679b019784bc0b131028ee74e381f4a2 (patch) | |
tree | 74a5e031b099169b8b215ebca188d715cbb7654e /perl | |
parent | 67a679afb17747b5ec392e56cf6121b085b38a3a (diff) | |
download | libguestfs-d082a76d679b019784bc0b131028ee74e381f4a2.tar.gz libguestfs-d082a76d679b019784bc0b131028ee74e381f4a2.tar.xz libguestfs-d082a76d679b019784bc0b131028ee74e381f4a2.zip |
add_drive: Don't use cache=off if not supported by underlying filesystem.
If you use the guestfs_add_drive function, then currently it
generates a qemu command line element like:
-drive ...,cache=off,...
This causes qemu to try to open the device with O_DIRECT.
Unfortunately some filesystems don't support this flag, notably tmpfs,
which means you can't use libguestfs in conjunction with tmpfs. On
some systems /tmp is a tmpfs filesystem.
This patch fixes this so that if the filesystem doesn't support
O_DIRECT, then we omit the cache=off parameter. This seems reasonable
from a reliability point of view, because if you're using tmpfs then
you probably didn't expect reliability in the case where your system
suddenly powers off.
Diffstat (limited to 'perl')
0 files changed, 0 insertions, 0 deletions