[Top][All Lists]

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

Re: [Qemu-block] [PATCH 1/1] nbd: implement bdrv_get_info callback

From: Edgar Kaziakhmedov
Subject: Re: [Qemu-block] [PATCH 1/1] nbd: implement bdrv_get_info callback
Date: Fri, 26 Jan 2018 13:39:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0


So, let me know if I need to make any changes in patch

On 1/18/18 1:09 PM, Paolo Bonzini wrote:
On 18/01/2018 12:51, Edgar Kaziakhmedov wrote:
+static int nbd_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
+    if (bs->supported_zero_flags & BDRV_REQ_MAY_UNMAP) {
+        bdi->can_write_zeroes_with_unmap = true;
+    }
+    return 0;
Other drivers set the flag always, while NBD only sets it if the server
knows the flag.

I think NBD is more correct, so:

Reviewed-by: Paolo Bonzini <address@hidden>

However, it would be nice to remove can_write_zeroes_with_unmap from
BlockDriverInfo, and make bdrv_can_write_zeroes_with_unmap just return
!!(bs->supported_zero_flags & BDRV_REQ_MAY_UNMAP).  Kevin, what do you


reply via email to

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