]> git.proxmox.com Git - mirror_qemu.git/commit - block/gluster.c
gluster: Query current size in do_truncate()
authorMax Reitz <mreitz@redhat.com>
Tue, 13 Feb 2018 13:03:52 +0000 (14:03 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 13 Feb 2018 15:18:33 +0000 (16:18 +0100)
commitf3a33f795cc7a3372d2372480d34f6b95a3b09b6
tree5bc36faeb9c3df38293e32ec8920a764e9c02f47
parent36e87909f8f324a7c442444e5cc02cc5efcdf360
gluster: Query current size in do_truncate()

Instead of expecting the current size to be 0, query it and allocate
only the area [current_size, offset) if preallocation is requested.

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