[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH for-2.10 2/3] block: Add errp to BD.bdrv_truncat
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH for-2.10 2/3] block: Add errp to BD.bdrv_truncate() |
Date: |
Mon, 6 Mar 2017 22:08:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |
On 06.03.2017 20:54, Max Reitz wrote:
> Add an Error parameter to the block drivers' bdrv_truncate() interface.
> If a block driver does not set this in case of an error, the generic
> bdrv_truncate() implementation will do so.
>
> Where it is obvious, this patch also makes some block drivers set this
> value.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> include/block/block_int.h | 2 +-
> block.c | 4 ++--
> block/archipelago.c | 3 ++-
> block/blkdebug.c | 4 ++--
> block/crypto.c | 5 +++--
> block/file-posix.c | 2 +-
> block/file-win32.c | 6 +++---
> block/gluster.c | 3 ++-
> block/iscsi.c | 4 ++--
> block/nfs.c | 2 +-
> block/qcow2.c | 8 ++++----
> block/qed.c | 2 +-
> block/raw-format.c | 4 ++--
> block/rbd.c | 2 +-
> block/sheepdog.c | 14 ++++++--------
> 15 files changed, 33 insertions(+), 32 deletions(-)
[...]
> diff --git a/block/archipelago.c b/block/archipelago.c
> index 2449cfc702..0015178381 100644
> --- a/block/archipelago.c
> +++ b/block/archipelago.c
> @@ -976,7 +976,8 @@ static int64_t
> qemu_archipelago_getlength(BlockDriverState *bs)
> return archipelago_volume_info(s);
> }
>
> -static int qemu_archipelago_truncate(BlockDriverState *bs, int64_t offset)
> +static int qemu_archipelago_truncate(BlockDriverState *bs, int64_t offset,
> + Error *errp)
This should be **errp, of course. Will fix. :-/
Max
> {
> int ret, targetlen;
> struct xseg_request *req;
signature.asc
Description: OpenPGP digital signature