mirror of https://github.com/xqemu/xqemu.git
block: add bdrv_set_enable_write_cache
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
c4a248a138
commit
425b01487a
5
block.c
5
block.c
|
@ -2380,6 +2380,11 @@ int bdrv_enable_write_cache(BlockDriverState *bs)
|
||||||
return bs->enable_write_cache;
|
return bs->enable_write_cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce)
|
||||||
|
{
|
||||||
|
bs->enable_write_cache = wce;
|
||||||
|
}
|
||||||
|
|
||||||
int bdrv_is_encrypted(BlockDriverState *bs)
|
int bdrv_is_encrypted(BlockDriverState *bs)
|
||||||
{
|
{
|
||||||
if (bs->backing_hd && bs->backing_hd->encrypted)
|
if (bs->backing_hd && bs->backing_hd->encrypted)
|
||||||
|
|
1
block.h
1
block.h
|
@ -291,6 +291,7 @@ BlockErrorAction bdrv_get_on_error(BlockDriverState *bs, int is_read);
|
||||||
int bdrv_is_read_only(BlockDriverState *bs);
|
int bdrv_is_read_only(BlockDriverState *bs);
|
||||||
int bdrv_is_sg(BlockDriverState *bs);
|
int bdrv_is_sg(BlockDriverState *bs);
|
||||||
int bdrv_enable_write_cache(BlockDriverState *bs);
|
int bdrv_enable_write_cache(BlockDriverState *bs);
|
||||||
|
void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce);
|
||||||
int bdrv_is_inserted(BlockDriverState *bs);
|
int bdrv_is_inserted(BlockDriverState *bs);
|
||||||
int bdrv_media_changed(BlockDriverState *bs);
|
int bdrv_media_changed(BlockDriverState *bs);
|
||||||
void bdrv_lock_medium(BlockDriverState *bs, bool locked);
|
void bdrv_lock_medium(BlockDriverState *bs, bool locked);
|
||||||
|
|
Loading…
Reference in New Issue