[Bug 11588] missing option: preallocate for all files except for sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #4 from Carson Gaspar --- rsync currently just has the receiver turn "long" sequences of zeroes into sparse regions when --sparse is specified. If --preallocate is also specified, what would you like rsync to do? No

[Bug 11588] missing option: preallocate for all files except for sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #6 from Carson Gaspar --- For punching holes, Solaris and UnixWare support F_FREESP(64) in fcntl(). Windows supports both reporting and punching holes, but I don't know if cygwin (or any other rsync on windows

[Bug 11588] missing option: preallocate for all files except for sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #7 from Wayne Davison --- Created attachment 12556 --> https://bugzilla.samba.org/attachment.cgi?id=12556=edit Preliminary patch to support punching holes In my testing, using both a pre-allocate call on a file

[Bug 11588] missing option: preallocate for all files except for sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #5 from Carson Gaspar --- (In reply to Carson Gaspar from comment #4) Actually, you never want the sender to scan for zero regions if SEEK_HOLE isn't supported, as performance would then be terrible. And a given

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #9 from Wayne Davison --- > Hole-punch works only for full filesystem blocks That has nothing to do with it. If you fallocate() the full file length and then (on the same file handle) try to punch out parts of the

[Bug 12305] --fallocate and --sparse work wrong

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=12305 --- Comment #5 from Коренберг Марк --- Fallocated: areas of the file that has been fallocate()d, but stillnot written. Technically, on sender, even written parts that was written, but contain zeroes may be considered as

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #8 from Andrey Gursky --- (In reply to Wayne Davison from comment #7) Wayne, since this bug made rsync unusable for me, I fixed that and implemented additional checks needed for ext4 a month or two after I

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #12 from Andrey Gursky --- (In reply to Wayne Davison from comment #9) >> Hole-punch works only for full filesystem blocks > That has nothing to do with it. Wayne, OK, might be. I haven't tested it the

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #16 from Andrey Gursky --- (In reply to Theodore Ts'o from comment #15) Theo, thanks for taking time to test it! This works for me too (Debian Testing 4.7.4-2, ext4): $ /usr/sbin/filefrag -v test-file

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #10 from Wayne Davison --- > ... I can share my work. Sounds interesting! Looking forward to seeing what you've come up with. -- You are receiving this mail because: You are the QA Contact for the bug. -- Please

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #13 from Andrey Gursky --- (In reply to Theodore Ts'o from comment #11) Theo, I believe "on the same file handle" is the unusual prerequisite to trigger the behavior described by Wayne. Or such a test is

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #14 from Theodore Ts'o --- >I believe "on the same file handle" is the unusual prerequisite to trigger the >>behavior described by Wayne. I was fairly sure that was a red herring, so I was trying to save myself some

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #15 from Theodore Ts'o --- Created attachment 12557 --> https://bugzilla.samba.org/attachment.cgi?id=12557=edit Test program to show that fallocate followed by punch hole works just fine -- You are receiving this

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #11 from Theodore Ts'o --- Re: #9. I'm not able to reproduce the described behavior. If you want to follow up on what you think is a kernel bug, please send a simple repro program or script and what version of the

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #18 from Wayne Davison --- FYI, I tested on Linux 4.2.0 and 3.10.0 (I don't have a newer kernel running here to try). -- You are receiving this mail because: You are the QA Contact for the bug. -- Please use

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #17 from Wayne Davison --- Take the test program and change the SYS_fallocate to use the FALLOC_FL_KEEP_SIZE flag (don't forget to "rm test-file") and it will fail. Rsync always pre-allocates with FALLOC_FL_KEEP_SIZE

[Bug 11588] better handling for --preallocate with --sparse

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11588 --- Comment #19 from Wayne Davison --- Also, to be more like rsync would do you can follow the hole-punch with a seek and a write so that the file ends up with a non-zero size. Apparently if I change the order to do the seek &