All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stubdom: fix read-only disks access
@ 2008-08-01 18:17 Samuel Thibault
  2008-08-03 17:13 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2008-08-01 18:17 UTC (permalink / raw)
  To: xen-devel


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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] stubdom: fix read-only disks access
  2008-08-01 18:17 [PATCH] stubdom: fix read-only disks access Samuel Thibault
@ 2008-08-03 17:13 ` Keir Fraser
  2008-08-03 17:30   ` Samuel Thibault
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2008-08-03 17:13 UTC (permalink / raw)
  To: Samuel Thibault, xen-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] stubdom: fix read-only disks access
  2008-08-03 17:13 ` Keir Fraser
@ 2008-08-03 17:30   ` Samuel Thibault
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2008-08-03 17:30 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-03 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 18:17 [PATCH] stubdom: fix read-only disks access Samuel Thibault
2008-08-03 17:13 ` Keir Fraser
2008-08-03 17:30   ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.