]> git.proxmox.com Git - mirror_qemu.git/commit - block/sheepdog.c
sheepdog: Pass old and new size to sd_prealloc()
authorMax Reitz <mreitz@redhat.com>
Tue, 13 Feb 2018 13:03:55 +0000 (14:03 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 13 Feb 2018 15:18:38 +0000 (16:18 +0100)
commit1a62baf62bdc30ec4856ac569cefb9d831808253
tree3dcbb95c900fb936187d745c524f84584ce67a21
parent8b9ad56e9cbfd852af53090d18bb32e94b539253
sheepdog: Pass old and new size to sd_prealloc()

sd_prealloc() will now preallocate the area [old_size, new_size).  As
before, it rounds to buf_size and may thus overshoot and preallocate
areas that were not requested to be preallocated.  For image creation,
this is no change in behavior.  For truncation, this is in accordance
with the documentation for preallocated truncation.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/sheepdog.c