[GEDI] [PATCH 07/17] gluster: Drop useless has_zero_init callback
Niels de Vos
ndevos at redhat.com
Mon Feb 17 08:06:14 UTC 2020
On Fri, Jan 31, 2020 at 11:44:26AM -0600, Eric Blake wrote:
> block.c already defaults to 0 if we don't provide a callback; there's
> no need to write a callback that always fails.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
Reviewed-by: Niels de Vos <ndevos at redhat.com>
> ---
> block/gluster.c | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/block/gluster.c b/block/gluster.c
> index 4fa4a77a4777..9d952c70981b 100644
> --- a/block/gluster.c
> +++ b/block/gluster.c
> @@ -1357,12 +1357,6 @@ static int64_t qemu_gluster_allocated_file_size(BlockDriverState *bs)
> }
> }
>
> -static int qemu_gluster_has_zero_init(BlockDriverState *bs)
> -{
> - /* GlusterFS volume could be backed by a block device */
> - return 0;
> -}
> -
> /*
> * Find allocation range in @bs around offset @start.
> * May change underlying file descriptor's file offset.
> @@ -1567,8 +1561,6 @@ static BlockDriver bdrv_gluster = {
> .bdrv_co_readv = qemu_gluster_co_readv,
> .bdrv_co_writev = qemu_gluster_co_writev,
> .bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
> - .bdrv_has_zero_init = qemu_gluster_has_zero_init,
> - .bdrv_has_zero_init_truncate = qemu_gluster_has_zero_init,
> #ifdef CONFIG_GLUSTERFS_DISCARD
> .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
> #endif
> @@ -1599,8 +1591,6 @@ static BlockDriver bdrv_gluster_tcp = {
> .bdrv_co_readv = qemu_gluster_co_readv,
> .bdrv_co_writev = qemu_gluster_co_writev,
> .bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
> - .bdrv_has_zero_init = qemu_gluster_has_zero_init,
> - .bdrv_has_zero_init_truncate = qemu_gluster_has_zero_init,
> #ifdef CONFIG_GLUSTERFS_DISCARD
> .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
> #endif
> @@ -1631,8 +1621,6 @@ static BlockDriver bdrv_gluster_unix = {
> .bdrv_co_readv = qemu_gluster_co_readv,
> .bdrv_co_writev = qemu_gluster_co_writev,
> .bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
> - .bdrv_has_zero_init = qemu_gluster_has_zero_init,
> - .bdrv_has_zero_init_truncate = qemu_gluster_has_zero_init,
> #ifdef CONFIG_GLUSTERFS_DISCARD
> .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
> #endif
> @@ -1669,8 +1657,6 @@ static BlockDriver bdrv_gluster_rdma = {
> .bdrv_co_readv = qemu_gluster_co_readv,
> .bdrv_co_writev = qemu_gluster_co_writev,
> .bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
> - .bdrv_has_zero_init = qemu_gluster_has_zero_init,
> - .bdrv_has_zero_init_truncate = qemu_gluster_has_zero_init,
> #ifdef CONFIG_GLUSTERFS_DISCARD
> .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
> #endif
> --
> 2.24.1
>
> _______________________________________________
> integration mailing list
> integration at gluster.org
> https://lists.gluster.org/mailman/listinfo/integration
>
More information about the integration
mailing list