Re: [PATCH] storage: fix file allocation behavior in file cloning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30.09.2013 18:57, Oskari Saarenmaa wrote:
> Fixed the safezero call for allocating the rest of the file after cloning
> an existing volume; it used to always use a zero offset, causing it to
> only allocate the beginning of the file.
> 
> Also modified file creation to try to use fallocate(2) to pre-allocate
> disk space before copying any data to make sure it fails early on if disk
> is full and makes sure we can skip zero blocks when copying file contents.
> 
> If fallocate isn't available we will zero out the rest of the file after
> cloning and only use sparse cloning if client requested a lower allocation
> than the input volume's capacity.
> 
> Signed-off-by: Oskari Saarenmaa <os@xxxxxxx>
> ---
>  the safezero mmap issue fixed in my previous patch never showed up because
>  all safezero calls previously had 0 offset (or maybe everyone's using
>  posix_fallocate)
> 
>  configure.ac                  |  8 ++++----
>  src/storage/storage_backend.c | 35 ++++++++++++++++++++++++++++++-----
>  2 files changed, 34 insertions(+), 9 deletions(-)

ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]