Samuel Thibault
2008-Aug-01 18:17 UTC
[Xen-devel] [PATCH] stubdom: fix read-only disks access
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@eu.citrix.com> diff -r 3dedb6209991 tools/ioemu/block-vbd.c --- a/tools/ioemu/block-vbd.c Fri Aug 01 12:18:02 2008 +0100 +++ b/tools/ioemu/block-vbd.c Fri Aug 01 19:16:52 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-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Aug-03 17:13 UTC
Re: [Xen-devel] [PATCH] stubdom: fix read-only disks access
Is no patch required for ioemu-remote? -- Keir On 1/8/08 19:17, "Samuel Thibault" <samuel.thibault@eu.citrix.com> wrote:> > 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@eu.citrix.com> > > diff -r 3dedb6209991 tools/ioemu/block-vbd.c > --- a/tools/ioemu/block-vbd.c Fri Aug 01 12:18:02 2008 +0100 > +++ b/tools/ioemu/block-vbd.c Fri Aug 01 19:16:52 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-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Aug-03 17:30 UTC
Re: [Xen-devel] [PATCH] stubdom: fix read-only disks access
Keir Fraser, le Sun 03 Aug 2008 18:13:26 +0100, a écrit :> Is no patch required for ioemu-remote?The same should apply fine. Samuel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel