aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block.c16
-rw-r--r--block/backup.c1
-rw-r--r--block/mirror.c1
-rw-r--r--include/block/block.h2
4 files changed, 0 insertions, 20 deletions
diff --git a/block.c b/block.c
index 7ff4fcb7f5..d36eb75be9 100644
--- a/block.c
+++ b/block.c
@@ -2695,22 +2695,6 @@ int bdrv_is_sg(BlockDriverState *bs)
return bs->sg;
}
-int bdrv_enable_write_cache(BlockDriverState *bs)
-{
- if (bs->blk) {
- return blk_enable_write_cache(bs->blk);
- } else {
- return true;
- }
-}
-
-void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce)
-{
- if (bs->blk) {
- blk_set_enable_write_cache(bs->blk, wce);
- }
-}
-
int bdrv_is_encrypted(BlockDriverState *bs)
{
if (bs->backing && bs->backing->bs->encrypted) {
diff --git a/block/backup.c b/block/backup.c
index 9170983ba9..491fd14068 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -404,7 +404,6 @@ static void coroutine_fn backup_run(void *opaque)
job->done_bitmap = bitmap_new(end);
- bdrv_set_enable_write_cache(target, true);
if (target->blk) {
blk_set_on_error(target->blk, on_target_error, on_target_error);
blk_iostatus_enable(target->blk);
diff --git a/block/mirror.c b/block/mirror.c
index 7bfd0d2996..f64db1a69b 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -856,7 +856,6 @@ static void mirror_start_job(BlockDriverState *bs, BlockDriverState *target,
bdrv_op_block_all(s->target, s->common.blocker);
- bdrv_set_enable_write_cache(s->target, true);
if (s->target->blk) {
blk_set_on_error(s->target->blk, on_target_error, on_target_error);
blk_iostatus_enable(s->target->blk);
diff --git a/include/block/block.h b/include/block/block.h
index 7bacd556b8..6a39f946f5 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -395,8 +395,6 @@ int bdrv_is_allocated_above(BlockDriverState *top, BlockDriverState *base,
int bdrv_is_read_only(BlockDriverState *bs);
int bdrv_is_sg(BlockDriverState *bs);
-int bdrv_enable_write_cache(BlockDriverState *bs);
-void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce);
bool bdrv_is_inserted(BlockDriverState *bs);
int bdrv_media_changed(BlockDriverState *bs);
void bdrv_lock_medium(BlockDriverState *bs, bool locked);