[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] stubdom: fix read-only disks access
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1217844437 -3600 # Node ID 6c1eb35869fd199317b9337c34d1541429f06536 # Parent 9109c9dfbc2e28440c300ed180710393639b8801 stubdom: fix read-only disks access 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@xxxxxxxxxxxxx> --- tools/ioemu/block-vbd.c | 4 ++++ 1 files changed, 4 insertions(+) diff -r 9109c9dfbc2e -r 6c1eb35869fd tools/ioemu/block-vbd.c --- a/tools/ioemu/block-vbd.c Mon Aug 04 11:06:31 2008 +0100 +++ b/tools/ioemu/block-vbd.c Mon Aug 04 11:07:17 2008 +0100 @@ -273,6 +273,10 @@ static BlockDriverAIOCB *vbd_aio_flush(B 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); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |