projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f06e832
)
stubdom: fix read-only disks access
author
Keir Fraser
<keir.fraser@citrix.com>
Mon, 4 Aug 2008 10:07:17 +0000
(11:07 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Mon, 4 Aug 2008 10:07:17 +0000
(11:07 +0100)
There is no need for a flush on read-only disks. It would actually
even error out and disturb the guest.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
tools/ioemu/block-vbd.c
patch
|
blob
|
history
diff --git
a/tools/ioemu/block-vbd.c
b/tools/ioemu/block-vbd.c
index a3465b748adbc22b2143667b2feec16feda37758..58015bdf007e70e7c8e0455ed78c92388a46708e 100644
(file)
--- a/
tools/ioemu/block-vbd.c
+++ b/
tools/ioemu/block-vbd.c
@@
-273,6
+273,10
@@
static BlockDriverAIOCB *vbd_aio_flush(BlockDriverState *bs,
BDRVVbdState *s = bs->opaque;
VbdAIOCB *acb = NULL;
+ if (s->info.mode == O_RDONLY) {
+ cb(opaque, 0);
+ return NULL;
+ }
if (s->info.barrier == 1) {
acb = vbd_aio_setup(bs, 0, NULL, 0,
s->info.flush == 1 ? vbd_nop_cb : cb, opaque);