mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: Remove bdrv_(set_)enable_write_cache()
The only remaining users were block jobs (mirror and backup) which unconditionally enabled WCE on the BlockBackend of the target image. As these block jobs don't go through BlockBackend for their I/O requests, they aren't affected by this setting anyway but always get a writeback mode, so that call can be removed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
61de4c6808
commit
09cf9db1bc
4 changed files with 0 additions and 20 deletions
16
block.c
16
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue