From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHIhj-0006Bv-LD for qemu-devel@nongnu.org; Fri, 21 Oct 2011 13:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHIhh-0002e0-IX for qemu-devel@nongnu.org; Fri, 21 Oct 2011 13:16:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHIhg-0002dp-S5 for qemu-devel@nongnu.org; Fri, 21 Oct 2011 13:16:21 -0400 From: Kevin Wolf Date: Fri, 21 Oct 2011 19:19:02 +0200 Message-Id: <1319217556-28273-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1319217556-28273-1-git-send-email-kwolf@redhat.com> References: <1319217556-28273-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 05/19] xen_disk: Always set feature-barrier = 1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org The synchronous .bdrv_flush callback doesn't exist any more and a device really shouldn't poke into the block layer internals anyway. All drivers are supposed to have a correctly working bdrv_flush, so let's just hard-code this. Signed-off-by: Kevin Wolf --- hw/xen_disk.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 8a9fac4..286bbac 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -620,7 +620,7 @@ static void blk_alloc(struct XenDevice *xendev) static int blk_init(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); - int index, qflags, have_barriers, info = 0; + int index, qflags, info = 0; /* read xenstore entries */ if (blkdev->params == NULL) { @@ -706,7 +706,6 @@ static int blk_init(struct XenDevice *xendev) blkdev->bs->drv ? blkdev->bs->drv->format_name : "-"); blkdev->file_size = 0; } - have_barriers = blkdev->bs->drv && blkdev->bs->drv->bdrv_flush ? 1 : 0; xen_be_printf(xendev, 1, "type \"%s\", fileproto \"%s\", filename \"%s\"," " size %" PRId64 " (%" PRId64 " MB)\n", @@ -714,7 +713,7 @@ static int blk_init(struct XenDevice *xendev) blkdev->file_size, blkdev->file_size >> 20); /* fill info */ - xenstore_write_be_int(&blkdev->xendev, "feature-barrier", have_barriers); + xenstore_write_be_int(&blkdev->xendev, "feature-barrier", 1); xenstore_write_be_int(&blkdev->xendev, "info", info); xenstore_write_be_int(&blkdev->xendev, "sector-size", blkdev->file_blk); xenstore_write_be_int(&blkdev->xendev, "sectors", -- 1.7.6.4