mirror of https://github.com/proxmox/mirror_qemu
xen_disk: Always set feature-barrier = 1
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 <kwolf@redhat.com>master
parent
b1b1dad31f
commit
5cce43bb28
|
@ -620,7 +620,7 @@ static void blk_alloc(struct XenDevice *xendev)
|
||||||
static int blk_init(struct XenDevice *xendev)
|
static int blk_init(struct XenDevice *xendev)
|
||||||
{
|
{
|
||||||
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, 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 */
|
/* read xenstore entries */
|
||||||
if (blkdev->params == NULL) {
|
if (blkdev->params == NULL) {
|
||||||
|
@ -706,7 +706,6 @@ static int blk_init(struct XenDevice *xendev)
|
||||||
blkdev->bs->drv ? blkdev->bs->drv->format_name : "-");
|
blkdev->bs->drv ? blkdev->bs->drv->format_name : "-");
|
||||||
blkdev->file_size = 0;
|
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\","
|
xen_be_printf(xendev, 1, "type \"%s\", fileproto \"%s\", filename \"%s\","
|
||||||
" size %" PRId64 " (%" PRId64 " MB)\n",
|
" size %" PRId64 " (%" PRId64 " MB)\n",
|
||||||
|
@ -714,7 +713,7 @@ static int blk_init(struct XenDevice *xendev)
|
||||||
blkdev->file_size, blkdev->file_size >> 20);
|
blkdev->file_size, blkdev->file_size >> 20);
|
||||||
|
|
||||||
/* fill info */
|
/* 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, "info", info);
|
||||||
xenstore_write_be_int(&blkdev->xendev, "sector-size", blkdev->file_blk);
|
xenstore_write_be_int(&blkdev->xendev, "sector-size", blkdev->file_blk);
|
||||||
xenstore_write_be_int(&blkdev->xendev, "sectors",
|
xenstore_write_be_int(&blkdev->xendev, "sectors",
|
||||||
|
|
Loading…
Reference in New Issue