[Bug 12305] New: --fallocate and --sparse works wrong

samba-bugs at samba.org samba-bugs at samba.org
Sat Oct 1 13:58:26 UTC 2016


https://bugzilla.samba.org/show_bug.cgi?id=12305

            Bug ID: 12305
           Summary: --fallocate and --sparse works wrong
           Product: rsync
           Version: 3.1.1
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayned at samba.org
          Reporter: socketpair at gmail.com
        QA Contact: rsync-qa at samba.org

1.If I specify --fallocate without --sparse:
Sparse areas of SRC become fallocated on DST. This is not what I expect.


2. If I specify --sparse without --fallocate:
Fallocated areas of SRC become sparse areas on DST, meaning that very important
 "attribute" is copied.

3. If I specify both --sparse and --fallocate:
Fallocate will win. see 1.

4. If I specify none of these flags:
sparse/preallocate information will be lost on DST.

This all is very sad.

So, during synchronisation, rsync should send type of the each area, which
should be on of:

1) containig user-data
2) sparse (contains zeroes)
3) preallocated (contain zeroes)

And receiver should apply that information on target file.

Note, that plain file may have preallocated space AFTER END OF FILE -- it is
not a bug, and should be transferred.

Also, receiver side may not handle all that features, so it should be
controllable what rsync receiver will do if making sparse or preallocated area
fails with EOPNOTSUPP or so.


Detecting holes and preallocated areas may give wrong information since some
FSes fake answer. So it should be controllable 

see:
man 2 fallocate for possible modern operations.
man 2 lseek: detecting that areas (SEEK_HOLE/SEEK_DATA)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the rsync mailing list