[Top][All Lists]

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

Re: [PATCH v7 27/47] blkverify: Use bdrv_sum_allocated_file_size()

From: Andrey Shinkevich
Subject: Re: [PATCH v7 27/47] blkverify: Use bdrv_sum_allocated_file_size()
Date: Mon, 20 Jul 2020 18:10:59 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 25.06.2020 18:21, Max Reitz wrote:
blkverify is a filter, so bdrv_get_allocated_file_size()'s default
implementation will return only the size of its filtered child.
However, because both of its children are disk images, it makes more
sense to sum both of their allocated sizes.

Signed-off-by: Max Reitz <mreitz@redhat.com>
  block/blkverify.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/block/blkverify.c b/block/blkverify.c
index 2f261de24b..64858c8df0 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -323,6 +323,7 @@ static BlockDriver bdrv_blkverify = {
      .bdrv_getlength                   = blkverify_getlength,
      .bdrv_refresh_filename            = blkverify_refresh_filename,
      .bdrv_dirname                     = blkverify_dirname,
+    .bdrv_get_allocated_file_size     = bdrv_sum_allocated_file_size,
.bdrv_co_preadv = blkverify_co_preadv,
      .bdrv_co_pwritev                  = blkverify_co_pwritev,

Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>

reply via email to

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