[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] block/file: Add file-specific image info
From: |
Kevin Wolf |
Subject: |
Re: [PATCH 4/4] block/file: Add file-specific image info |
Date: |
Wed, 4 May 2022 10:46:21 +0200 |
Am 03.05.2022 um 16:55 hat Hanna Reitz geschrieben:
> Add some (optional) information that the file driver can provide for
> image files, namely the extent size.
>
> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
> ---
> qapi/block-core.json | 26 ++++++++++++++++++++++++--
> block/file-posix.c | 30 ++++++++++++++++++++++++++++++
> 2 files changed, 54 insertions(+), 2 deletions(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index e7d6c2e0cc..728da051ae 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -139,16 +139,29 @@
> '*encryption-format': 'RbdImageEncryptionFormat'
> } }
>
> +##
> +# @ImageInfoSpecificFile:
> +#
> +# @extent-size: Extent size (if available)
> +#
> +# Since: 7.1
> +##
> +{ 'struct': 'ImageInfoSpecificFile',
> + 'data': {
> + '*extent-size': 'size'
> + } }
It's not "the extent size" (the whole point of extents is that they
don't have a fixed size like blocks), but an extent size *hint* that
tells the filesystem the minimum size to allocate for an extent. The
xfs_io man page calls it the preferred extent size for allocatino, which
works for the documentation if you prefer, but BlockdevCreateOptionsFile
has 'extent-size-hint', so I'd prefer consistency on the wire at least.
Kevin