Am 08.09.2011 17:24, schrieb Paolo Bonzini:
> The server can use it to issue a flush automatically after a
> write.  The client can also use it to mimic a write-through
> cache.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  block/nbd.c |    8 ++++++++
>  nbd.c       |   13 +++++++++++--
>  2 files changed, 19 insertions(+), 2 deletions(-)

> @@ -674,6 +675,14 @@ int nbd_trip(BlockDriverState *bs, int csock, off_t 
> size, uint64_t dev_offset,
>              }
>  
>              *offset += request.len;
> +
> +            if (request.type & NBD_CMD_FLAG_FUA) {
> +                if (bdrv_flush(bs) == -1) {

Need to check for < 0 here as well.

Kevin

Reply via email to