[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/9] gluster: Drop useless has_zero_init callback
From: |
Eric Blake |
Subject: |
[PATCH 1/9] gluster: Drop useless has_zero_init callback |
Date: |
Tue, 28 Apr 2020 15:28:57 -0500 |
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 <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
---
block/gluster.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/block/gluster.c b/block/gluster.c
index d06df900f692..31233cac696a 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -1359,12 +1359,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.
@@ -1569,8 +1563,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
@@ -1601,8 +1593,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
@@ -1633,8 +1623,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
@@ -1671,8 +1659,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.26.2
- [PATCH 0/9] More truncate improvements, Eric Blake, 2020/04/28
- [PATCH 2/9] file-win32: Support BDRV_REQ_ZERO_WRITE for truncate, Eric Blake, 2020/04/28
- [PATCH 3/9] nfs: Support BDRV_REQ_ZERO_WRITE for truncate, Eric Blake, 2020/04/28
- [PATCH 1/9] gluster: Drop useless has_zero_init callback,
Eric Blake <=
- [PATCH 4/9] rbd: Support BDRV_REQ_ZERO_WRITE for truncate, Eric Blake, 2020/04/28
- [PATCH 6/9] ssh: Support BDRV_REQ_ZERO_WRITE for truncate, Eric Blake, 2020/04/28
- [PATCH 5/9] sheepdog: Support BDRV_REQ_ZERO_WRITE for truncate, Eric Blake, 2020/04/28
- [PATCH 7/9] parallels: Rework truncation logic, Eric Blake, 2020/04/28
- [PATCH 8/9] vhdx: Rework truncation logic, Eric Blake, 2020/04/28
- [PATCH 9/9] block: Drop unused .bdrv_has_zero_init_truncate, Eric Blake, 2020/04/28
- Re: [PATCH 0/9] More truncate improvements, no-reply, 2020/04/28