xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
Stefano Stabellini 2012-03-23 11:39:51 +00:00
parent 33cf629a37
commit 820914103c

View File

@ -584,10 +584,10 @@ static int blk_init(struct XenDevice *xendev)
}
/* read-only ? */
qflags = BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO;
if (strcmp(blkdev->mode, "w") == 0) {
qflags = BDRV_O_RDWR;
qflags |= BDRV_O_RDWR;
} else {
qflags = 0;
info |= VDISK_READONLY;
}