[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/20] block/qapi: Use blk_enable_write_cache()
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH 11/20] block/qapi: Use blk_enable_write_cache() |
Date: |
Sat, 26 Mar 2016 21:14:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 |
On 18.03.2016 19:21, Kevin Wolf wrote:
> Now that WCE is handled on the BlockBackend level, the flag is
> meaningless for BDSes. As the schema requires us to fill the field,
> we return an enabled write cache for them.
>
> Note that this means that querying the BlockBackend name may return
> writethrough as the cache information, whereas querying the node-name of
> the root of that same BlockBackend will return writeback.
>
> This may appear odd at first,
Yeah, intuitively I'd think that a BDS shares the writeback mode of the
BB at the tree root, but...
> but it actually makes sense because it
> correctly repesents the layer that implements the WCE handling.
...when you actually access the BDS directly, i.e., not through the
whole tree and the BB at its root, then you will indeed get WB behavior.
> This
> becomes more apparent when you consider nodes that are the root node of
> multiple BlockBackends, where each BB can have its own WCE setting.
True.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 2 +-
> block/qapi.c | 7 +++---
> include/block/qapi.h | 3 ++-
> tests/qemu-iotests/142 | 7 +++++-
> tests/qemu-iotests/142.out | 57
> ++++++++++++++++++++++++++++++++++++++--------
> 5 files changed, 60 insertions(+), 16 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 16/20] block: Use bdrv_parse_cache_mode() in drive_init(), (continued)
- [Qemu-devel] [PATCH 15/20] raw: Support BDRV_REQ_FUA, Kevin Wolf, 2016/03/18
- [Qemu-devel] [PATCH 12/20] block: Introduce bdrv_co_writev_flags(), Kevin Wolf, 2016/03/18
- [Qemu-devel] [PATCH 13/20] iscsi: Support BDRV_REQ_FUA, Kevin Wolf, 2016/03/18
- [Qemu-devel] [PATCH 11/20] block/qapi: Use blk_enable_write_cache(), Kevin Wolf, 2016/03/18
- Re: [Qemu-devel] [PATCH 11/20] block/qapi: Use blk_enable_write_cache(),
Max Reitz <=
- [Qemu-devel] [PATCH 14/20] nbd: Support BDRV_REQ_FUA, Kevin Wolf, 2016/03/18
- [Qemu-devel] [PATCH 18/20] block: Remove bdrv_parse_cache_flags(), Kevin Wolf, 2016/03/18
- [Qemu-devel] [PATCH 17/20] qemu-io: Use bdrv_parse_cache_mode() in reopen_f(), Kevin Wolf, 2016/03/18
- [Qemu-devel] [PATCH 20/20] block: Remove bdrv_(set_)enable_write_cache(), Kevin Wolf, 2016/03/18
- [Qemu-devel] [PATCH 19/20] block: Remove BDRV_O_CACHE_WB, Kevin Wolf, 2016/03/18