[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 11/20] block/qapi: Use blk_enable_write_cache()

From: Max Reitz
Subject: Re: [Qemu-block] [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.


> 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>

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]