block: Move enable_write_cache to BB level
Whether a write cache is used or not is a decision that concerns the user (e.g. the guest device) rather than the backend. It was already logically part of the BB level as bdrv_move_feature_fields() always kept it on top of the BDS tree; with this patch, the core of it (the actual flag and the additional flushes) is also implemented there. Direct callers of bdrv_open() must pass BDRV_O_CACHE_WB now if bs doesn't have a BlockBackend attached. Signed-off-by:Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com>
Showing
- block.c 17 additions, 9 deletionsblock.c
- block/block-backend.c 27 additions, 15 deletionsblock/block-backend.c
- block/io.c 1 addition, 1 deletionblock/io.c
- block/iscsi.c 1 addition, 1 deletionblock/iscsi.c
- include/block/block.h 1 addition, 0 deletionsinclude/block/block.h
- include/block/block_int.h 0 additions, 3 deletionsinclude/block/block_int.h
- tests/qemu-iotests/142 2 additions, 2 deletionstests/qemu-iotests/142
- tests/qemu-iotests/142.out 4 additions, 4 deletionstests/qemu-iotests/142.out
Loading
Please register or sign in to comment