From 1dcaf52760ccaa2e019164c887b8436ac6c5d8ea Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 24 Jul 2019 19:12:32 +0200 Subject: 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 Message-id: 20190724171239.8764-5-mreitz@redhat.com Reviewed-by: Maxim Levitsky Reviewed-by: Stefano Garzarella Signed-off-by: Max Reitz --- block/rbd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block/rbd.c') diff --git a/block/rbd.c b/block/rbd.c index 59757b3..057af43 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -1288,6 +1288,7 @@ static BlockDriver bdrv_rbd = { .bdrv_co_create = qemu_rbd_co_create, .bdrv_co_create_opts = qemu_rbd_co_create_opts, .bdrv_has_zero_init = bdrv_has_zero_init_1, + .bdrv_has_zero_init_truncate = bdrv_has_zero_init_1, .bdrv_get_info = qemu_rbd_getinfo, .create_opts = &qemu_rbd_create_opts, .bdrv_getlength = qemu_rbd_getlength, -- cgit v1.1