summaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2012-09-20 15:13:22 -0400
committerKevin Wolf <kwolf@redhat.com>2012-09-24 15:15:11 +0200
commit39c9fb9565613a5ca0ae6e83ea115585f91527bb (patch)
tree572e7ad7f54225aef021c9fecf1a06365d615133 /block/sheepdog.c
parent6a8dc0422e508fc85390e55cbca1b93cb242d22d (diff)
downloadqemu-39c9fb9565613a5ca0ae6e83ea115585f91527bb.tar.gz
block: do not parse BDRV_O_CACHE_WB in block drivers
Block drivers should ignore BDRV_O_CACHE_WB in .bdrv_open flags, and in the bs->open_flags. This patch removes the code, leaving the behaviour behind as if BDRV_O_CACHE_WB was set. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index e0753ee9e5..4742f8ae6f 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1114,14 +1114,12 @@ static int sd_open(BlockDriverState *bs, const char *filename, int flags)
goto out;
}
- if (flags & BDRV_O_CACHE_WB) {
- s->cache_enabled = 1;
- s->flush_fd = connect_to_sdog(s->addr, s->port);
- if (s->flush_fd < 0) {
- error_report("failed to connect");
- ret = s->flush_fd;
- goto out;
- }
+ s->cache_enabled = 1;
+ s->flush_fd = connect_to_sdog(s->addr, s->port);
+ if (s->flush_fd < 0) {
+ error_report("failed to connect");
+ ret = s->flush_fd;
+ goto out;
}
if (snapid || tag[0] != '\0') {