WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] stubdom: fix read-only disks access

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] stubdom: fix read-only disks access
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Aug 2008 15:10:12 -0700
Delivery-date: Mon, 04 Aug 2008 15:10:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] stubdom: fix read-only disks access, Xen patchbot-unstable <=