diff options
author | Max Reitz <mreitz@redhat.com> | 2017-03-28 22:51:28 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2017-04-28 16:02:03 +0200 |
commit | 4bff28b81a0ddb48a09d279e99ab847e8a292506 (patch) | |
tree | 5d792e847143ace016de670db3106a3d9466c10a /block/nfs.c | |
parent | ed3d2ec98a33fbdeabc471b11ff807075f07e996 (diff) |
block: Add errp to BD.bdrv_truncate()
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 <mreitz@redhat.com>
Message-id: 20170328205129.15138-4-mreitz@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/nfs.c')
-rw-r--r-- | block/nfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/nfs.c b/block/nfs.c index 6541dec1fc..5ae665abd4 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -764,7 +764,7 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) return (task.ret < 0 ? task.ret : st.st_blocks * 512); } -static int nfs_file_truncate(BlockDriverState *bs, int64_t offset) +static int nfs_file_truncate(BlockDriverState *bs, int64_t offset, Error **errp) { NFSClient *client = bs->opaque; return nfs_ftruncate(client->context, client->fh, offset); |