[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/19] xen_disk: Always set feature-barrier = 1
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 05/19] xen_disk: Always set feature-barrier = 1 |
Date: |
Fri, 21 Oct 2011 19:19:02 +0200 |
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 <address@hidden>
---
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
- [Qemu-devel] [PULL 00/19] Block patches, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 01/19] sheepdog: add coroutine_fn markers, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 02/19] add socket_set_block, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 03/19] block: rename bdrv_co_rw_bh, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 04/19] fix memory leak in aio_write_f, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 05/19] xen_disk: Always set feature-barrier = 1,
Kevin Wolf <=
- [Qemu-devel] [PATCH 08/19] block: add bdrv_co_discard and bdrv_aio_discard support, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 06/19] block: unify flush implementations, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 10/19] qemu-img: Don't allow preallocation and compression at the same time, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 09/19] fdc: Fix floppy port I/O, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 11/19] qcow2: Fix bdrv_write_compressed error handling, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 07/19] block: drop redundant bdrv_flush implementation, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 12/19] pc: Fix floppy drives with if=none, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 17/19] block: take lock around bdrv_write implementations, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 14/19] vmdk: clean up open, Kevin Wolf, 2011/10/21
- [Qemu-devel] [PATCH 16/19] block: take lock around bdrv_read implementations, Kevin Wolf, 2011/10/21