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 <kw...@redhat.com>
> ---
>  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 <mre...@redhat.com>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to