|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [PATCH 2/8] block/vpc: return ZERO block-status when appropriate |
Date: | Thu, 7 May 2020 10:08:27 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
07.05.2020 0:18, Eric Blake wrote:
On 5/6/20 4:25 AM, Vladimir Sementsov-Ogievskiy wrote:In case when get_image_offset() returns -1, we do zero out the corresponding chunk of qiov. So, this should be reported as ZERO. After block-status update, it never reports 0, so setting unallocated_blocks_are_zero doesn't make sense. Drop it.Same analysis as in patch 1 as to the lone two clients that cared, and the fact that we are changing 'qemu-io -c map' output by reporting data as allocated now. But I concur that as there is never a backing file, the change is not a regression, but rather a bug fix.
Note that we have a problem with meaning of unallocated for protocol drivers. For example, iscsi block_status return 0, and it means "unallocated garbage", i.e. not occupying space, read may return any garbage. But vdi and vpc are format drivers, just don't support backing and they would better return ZERO status where appropriate.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden> --- block/vpc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)While the commit message could be improved, the code change itself looks correct. Reviewed-by: Eric Blake <address@hidden>
-- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |