aboutsummaryrefslogtreecommitdiff
path: root/block/gluster.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-07-24 19:12:32 +0200
committerMax Reitz <mreitz@redhat.com>2019-08-19 17:13:26 +0200
commit1dcaf52760ccaa2e019164c887b8436ac6c5d8ea (patch)
tree51e70c5a585d2f3f6062719d843cdf00d9e573c3 /block/gluster.c
parentceaca56feee6a1d682c882300855cad44a67ec8e (diff)
downloadqemu-1dcaf52760ccaa2e019164c887b8436ac6c5d8ea.zip
qemu-1dcaf52760ccaa2e019164c887b8436ac6c5d8ea.tar.gz
qemu-1dcaf52760ccaa2e019164c887b8436ac6c5d8ea.tar.bz2
block: Implement .bdrv_has_zero_init_truncate()
We need to implement .bdrv_has_zero_init_truncate() for every block driver that supports truncation and has a .bdrv_has_zero_init() implementation. Implement it the same way each driver implements .bdrv_has_zero_init(). This is at least not any more unsafe than what we had before. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190724171239.8764-5-mreitz@redhat.com Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/gluster.c')
-rw-r--r--block/gluster.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/gluster.c b/block/gluster.c
index f64dc5b..64028b2 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -1567,6 +1567,7 @@ static BlockDriver bdrv_gluster = {
.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
@@ -1598,6 +1599,7 @@ static BlockDriver bdrv_gluster_tcp = {
.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
@@ -1629,6 +1631,7 @@ static BlockDriver bdrv_gluster_unix = {
.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
@@ -1666,6 +1669,7 @@ static BlockDriver bdrv_gluster_rdma = {
.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