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/file-posix.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block/file-posix.c') diff --git a/block/file-posix.c b/block/file-posix.c index e41e91e075..fbeb0068db 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2938,6 +2938,7 @@ BlockDriver bdrv_file = { .bdrv_co_create = raw_co_create, .bdrv_co_create_opts = raw_co_create_opts, .bdrv_has_zero_init = bdrv_has_zero_init_1, + .bdrv_has_zero_init_truncate = bdrv_has_zero_init_1, .bdrv_co_block_status = raw_co_block_status, .bdrv_co_invalidate_cache = raw_co_invalidate_cache, .bdrv_co_pwrite_zeroes = raw_co_pwrite_zeroes, -- cgit v1.2.3-70-g09d2