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-3.2-testing] ioemu: cache the BlockDriverState poin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] ioemu: cache the BlockDriverState pointer
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jan 2008 07:01:00 -0800
Delivery-date: Thu, 24 Jan 2008 07:01:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1201186232 0
# Node ID 90162a182a0dab15c8807f9343d6322b32a3b9db
# Parent  a6d71da3ec6f0b1cf9f565c440f5ec1f7e631e94
ioemu: cache the BlockDriverState pointer
This actually fixes a bug in the scsi case.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
xen-unstable changeset:   16863:6496ad18c3e286d03dc5f3b80588d06deec7c39f
xen-unstable date:        Wed Jan 23 18:02:48 2008 +0000
---
 tools/ioemu/xenstore.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r a6d71da3ec6f -r 90162a182a0d tools/ioemu/xenstore.c
--- a/tools/ioemu/xenstore.c    Thu Jan 24 14:50:01 2008 +0000
+++ b/tools/ioemu/xenstore.c    Thu Jan 24 14:50:32 2008 +0000
@@ -85,6 +85,7 @@ void xenstore_parse_domain_config(int do
         *dev = NULL, *params = NULL, *type = NULL, *drv = NULL;
     int i, is_scsi, is_hdN = 0;
     unsigned int len, num, hd_index;
+    BlockDriverState *bs;
 
     for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
         media_filename[i] = NULL;
@@ -209,17 +210,17 @@ void xenstore_parse_domain_config(int do
             }
         }
 
-        bs_table[hd_index + (is_scsi ? MAX_DISKS : 0)] = bdrv_new(dev);
+        bs = bs_table[hd_index + (is_scsi ? MAX_DISKS : 0)] = bdrv_new(dev);
         /* check if it is a cdrom */
         if (type && !strcmp(type, "cdrom")) {
-            bdrv_set_type_hint(bs_table[hd_index], BDRV_TYPE_CDROM);
+            bdrv_set_type_hint(bs, BDRV_TYPE_CDROM);
             if (pasprintf(&buf, "%s/params", bpath) != -1)
                 xs_watch(xsh, buf, dev);
         }
+
         /* open device now if media present */
         if (params[0]) {
-            if (bdrv_open(bs_table[hd_index + (is_scsi ? MAX_DISKS : 0)],
-                          params, 0 /* snapshot */) < 0)
+            if (bdrv_open(bs, params, 0 /* snapshot */) < 0)
                 fprintf(stderr, "qemu: could not open hard disk image '%s'\n",
                         params);
         }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] ioemu: cache the BlockDriverState pointer, Xen patchbot-3.2-testing <=