[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 09/15] qemu-io: add preallocate mode parameter for truncat
From: |
Max Reitz |
Subject: |
Re: [PATCH v6 09/15] qemu-io: add preallocate mode parameter for truncate command |
Date: |
Thu, 24 Sep 2020 19:08:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 18.09.20 20:19, Vladimir Sementsov-Ogievskiy wrote:
> This will be used in further test.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> qemu-io-cmds.c | 46 ++++++++++++++++++++++++++++++++--------------
> 1 file changed, 32 insertions(+), 14 deletions(-)
>
> diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
> index baeae86d8c..64f0246a71 100644
> --- a/qemu-io-cmds.c
> +++ b/qemu-io-cmds.c
> @@ -1698,13 +1698,42 @@ static const cmdinfo_t flush_cmd = {
> .oneline = "flush all in-core file state to disk",
> };
>
> +static int truncate_f(BlockBackend *blk, int argc, char **argv);
> +static const cmdinfo_t truncate_cmd = {
> + .name = "truncate",
> + .altname = "t",
> + .cfunc = truncate_f,
> + .perm = BLK_PERM_WRITE | BLK_PERM_RESIZE,
> + .argmin = 1,
> + .argmax = 3,
> + .args = "[-m prealloc_mode] off",
> + .oneline = "truncates the current file at the given offset",
> +};
> +
Forward-declaring truncate_cmd instead of truncate_f would mean a
smaller diffstat.
But that isn’t what other commands do, so.
*shrug*
Reviewed-by: Max Reitz <mreitz@redhat.com>
signature.asc
Description: OpenPGP digital signature
- [PATCH v6 01/15] block: simplify comment to BDRV_REQ_SERIALISING, (continued)
- [PATCH v6 01/15] block: simplify comment to BDRV_REQ_SERIALISING, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 02/15] block/io.c: drop assertion on double waiting for request serialisation, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 03/15] block/io: split out bdrv_find_conflicting_request, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 05/15] block: bdrv_mark_request_serialising: split non-waiting function, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 04/15] block/io: bdrv_wait_serialising_requests_locked: drop extra bs arg, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 06/15] block: introduce BDRV_REQ_NO_WAIT flag, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 07/15] block: bdrv_check_perm(): process children anyway, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 09/15] qemu-io: add preallocate mode parameter for truncate command, Vladimir Sementsov-Ogievskiy, 2020/09/18
- Re: [PATCH v6 09/15] qemu-io: add preallocate mode parameter for truncate command,
Max Reitz <=
- [PATCH v6 08/15] block: introduce preallocate filter, Vladimir Sementsov-Ogievskiy, 2020/09/18
- [PATCH v6 11/15] iotests: add 298 to test new preallocate filter driver, Vladimir Sementsov-Ogievskiy, 2020/09/18
[PATCH v6 10/15] iotests: qemu_io_silent: support --image-opts, Vladimir Sementsov-Ogievskiy, 2020/09/18