[PATCH 3/8] block/crypto: drop unallocated_blocks_are_zero

Vladimir Sementsov-Ogievskiy posted 8 patches 5 years, 6 months ago
Maintainers: Kevin Wolf <kwolf@redhat.com>, Jeff Cody <codyprime@gmail.com>, Fam Zheng <fam@euphon.net>, Stefan Hajnoczi <stefanha@redhat.com>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Max Reitz <mreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Stefan Weil <sw@weilnetz.de>, Peter Lieven <pl@kamp.de>
There is a newer version of this series
[PATCH 3/8] block/crypto: drop unallocated_blocks_are_zero
Posted by Vladimir Sementsov-Ogievskiy 5 years, 6 months ago
It's false by default, no needs to set it. We are going to drop this
variable at all, so drop it now here, it doesn't hurt.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 block/crypto.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/block/crypto.c b/block/crypto.c
index e02f343590..7685e61844 100644
--- a/block/crypto.c
+++ b/block/crypto.c
@@ -694,7 +694,6 @@ static int block_crypto_get_info_luks(BlockDriverState *bs,
         return ret;
     }
 
-    bdi->unallocated_blocks_are_zero = false;
     bdi->cluster_size = subbdi.cluster_size;
 
     return 0;
-- 
2.21.0


Re: [PATCH 3/8] block/crypto: drop unallocated_blocks_are_zero
Posted by Eric Blake 5 years, 6 months ago
On 5/6/20 4:25 AM, Vladimir Sementsov-Ogievskiy wrote:
> It's false by default, no needs to set it. We are going to drop this
> variable at all, so drop it now here, it doesn't hurt.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>   block/crypto.c | 1 -
>   1 file changed, 1 deletion(-)

Trivially correct, regardless of clients.

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block/crypto.c b/block/crypto.c
> index e02f343590..7685e61844 100644
> --- a/block/crypto.c
> +++ b/block/crypto.c
> @@ -694,7 +694,6 @@ static int block_crypto_get_info_luks(BlockDriverState *bs,
>           return ret;
>       }
>   
> -    bdi->unallocated_blocks_are_zero = false;
>       bdi->cluster_size = subbdi.cluster_size;
>   
>       return 0;
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org