diff options
author | Christoph Hellwig <hch@lst.de> | 2011-05-17 18:04:06 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-06-08 10:39:32 +0200 |
commit | a659979328fb6d4d6100d398f5bd9a2310c3e169 (patch) | |
tree | 8d465d20ea1efc82134941d9a589c4b224ce4b3b /blockdev.c | |
parent | 69c38b8fcec823da05f98f6ea98ec2b0013d64e2 (diff) |
block: clarify the meaning of BDRV_O_NOCACHE
Change BDRV_O_NOCACHE to only imply bypassing the host OS file cache,
but no writeback semantics. All existing callers are changed to also
specify BDRV_O_CACHE_WB to give them writeback semantics.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c index 6e0eb831c1..1502575acb 100644 --- a/blockdev.c +++ b/blockdev.c @@ -326,7 +326,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) if ((buf = qemu_opt_get(opts, "cache")) != NULL) { if (!strcmp(buf, "off") || !strcmp(buf, "none")) { - bdrv_flags |= BDRV_O_NOCACHE; + bdrv_flags |= BDRV_O_NOCACHE | BDRV_O_CACHE_WB; } else if (!strcmp(buf, "writeback")) { bdrv_flags |= BDRV_O_CACHE_WB; } else if (!strcmp(buf, "unsafe")) { |