diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/block-backend.c | 11 | ||||
-rw-r--r-- | block/vvfat.c | 3 |
2 files changed, 1 insertions, 13 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index a263636a58..d74f6701b5 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -150,8 +150,6 @@ BlockBackend *blk_new_open(const char *filename, const char *reference, BlockBackend *blk; int ret; - assert((flags & BDRV_O_CACHE_WB) == 0); - blk = blk_new_with_bs(errp); if (!blk) { QDECREF(options); @@ -1224,15 +1222,6 @@ int blk_enable_write_cache(BlockBackend *blk) void blk_set_enable_write_cache(BlockBackend *blk, bool wce) { blk->enable_write_cache = wce; - - /* TODO Remove this when BDRV_O_CACHE_WB isn't used any more */ - if (blk->root) { - if (wce) { - blk->root->bs->open_flags |= BDRV_O_CACHE_WB; - } else { - blk->root->bs->open_flags &= ~BDRV_O_CACHE_WB; - } - } } void blk_invalidate_cache(BlockBackend *blk, Error **errp) diff --git a/block/vvfat.c b/block/vvfat.c index eb1126cbad..6b853146f0 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2957,8 +2957,7 @@ static int enable_write_target(BDRVVVFATState *s, Error **errp) options = qdict_new(); qdict_put(options, "driver", qstring_from_str("qcow")); ret = bdrv_open(&s->qcow, s->qcow_filename, NULL, options, - BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, - errp); + BDRV_O_RDWR | BDRV_O_NO_FLUSH, errp); if (ret < 0) { goto err; } |