[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 & the write first and T

[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 reply-all for most repli

[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 when the flag is av

[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 Filesystem type is: ef53 File si

[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&action=edit Test program to show that fallocate followed by punch hole works just fine -- You are receiving this mail bec

[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 time, but no, it d

[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 already contained in e2fsprogs

[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 exactly way you're doing it now,

[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 kernel you are usin

[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 use reply-all for m

[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 allocated file, no bl

[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 reported this bug and saw no

[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 fallocated areas. I mean tha

[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&action=edit Preliminary patch to support punching holes In my testing, using both a pre-allocate call on a file followed by a h

[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 platform) implements it.

[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 filesystem may not suppo

[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 wire protocol chang

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

2016-10-08 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=12305 --- Comment #4 from Carson Gaspar --- Please define what you mean by 'fallocated' in (1) and (2). Please also specify how you're determining that something has been 'fallocated'. I agree that (3) is a bug, and as the only real one that I can see, a