diff options
author | Max Reitz <mreitz@redhat.com> | 2020-06-22 13:58:45 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-09-07 12:31:31 +0200 |
commit | 07cd7b659a7169ed4c5c6b45b48d8351566ed4cb (patch) | |
tree | 37318823bf2ba4519de5cd4019deed5583a3ef3c /block/null.c | |
parent | 081e465026769a24b86ba2e6a77709cfea33f16a (diff) |
block/null: Implement bdrv_get_allocated_file_size
It is trivial, so we might as well do it.
Remove _filter_actual_image_size from iotest 184, so we get to see the
result in its reference output.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/null.c')
-rw-r--r-- | block/null.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/null.c b/block/null.c index 15e1d56746..cc9b1d4ea7 100644 --- a/block/null.c +++ b/block/null.c @@ -262,6 +262,11 @@ static void null_refresh_filename(BlockDriverState *bs) bs->drv->format_name); } +static int64_t null_allocated_file_size(BlockDriverState *bs) +{ + return 0; +} + static const char *const null_strong_runtime_opts[] = { BLOCK_OPT_SIZE, NULL_OPT_ZEROES, @@ -277,6 +282,7 @@ static BlockDriver bdrv_null_co = { .bdrv_file_open = null_file_open, .bdrv_parse_filename = null_co_parse_filename, .bdrv_getlength = null_getlength, + .bdrv_get_allocated_file_size = null_allocated_file_size, .bdrv_co_preadv = null_co_preadv, .bdrv_co_pwritev = null_co_pwritev, @@ -297,6 +303,7 @@ static BlockDriver bdrv_null_aio = { .bdrv_file_open = null_file_open, .bdrv_parse_filename = null_aio_parse_filename, .bdrv_getlength = null_getlength, + .bdrv_get_allocated_file_size = null_allocated_file_size, .bdrv_aio_preadv = null_aio_preadv, .bdrv_aio_pwritev = null_aio_pwritev, |