Re: [RFC/PATCH] cp: Add option to pre-allocate space for files

2012-06-12 Thread Philipp Thomas
* Pádraig Brady (p...@draigbrady.com) [20120511 17:46]: > This feature is already under consideration. > See the comments at: http://bugs.gnu.org/9500 FWIW, SUSE patches coreutils (patch attached) to use fallocate when sparse=never or non-sparse files with sparse=auto (!make_holes in copy.c(copy_

Re: [RFC/PATCH] cp: Add option to pre-allocate space for files

2012-05-11 Thread Mark
Hi, On Fri, May 11, 2012 16:45, Pádraig Brady wrote: > On 05/11/2012 04:03 PM, Mark wrote: >> Here's a patch for cp which adds a new --preallocate option. When >> specified, cp allocates disk space for the destination file before >> ... >> >> To-do list: >> - Add --preallocate option to mv as wel

bug#9500: [RFC/PATCH] cp: Add option to pre-allocate space for files

2012-05-11 Thread Pádraig Brady
On 05/11/2012 04:03 PM, Mark wrote: > Hi, > > Here's a patch for cp which adds a new --preallocate option. When > specified, cp allocates disk space for the destination file before writing > data. It uses fallocate() with FALLOC_FL_KEEP_SIZE on Linux, falling back > to posix_fallocate() if that fai

Re: [RFC/PATCH] cp: Add option to pre-allocate space for files

2012-05-11 Thread Pádraig Brady
On 05/11/2012 04:03 PM, Mark wrote: > Hi, > > Here's a patch for cp which adds a new --preallocate option. When > specified, cp allocates disk space for the destination file before writing > data. It uses fallocate() with FALLOC_FL_KEEP_SIZE on Linux, falling back > to posix_fallocate() if that fa

[RFC/PATCH] cp: Add option to pre-allocate space for files

2012-05-11 Thread Mark
Hi, Here's a patch for cp which adds a new --preallocate option. When specified, cp allocates disk space for the destination file before writing data. It uses fallocate() with FALLOC_FL_KEEP_SIZE on Linux, falling back to posix_fallocate() if that fails. Benefits of preallocation: - Disk fragmen