bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Detection of sparse files is broken on btrfs


From: Joerg Schilling
Subject: Re: [Bug-tar] Detection of sparse files is broken on btrfs
Date: Mon, 8 Jan 2018 17:54:20 +0100
User-agent: Heirloom mailx 12.5 7/5/10

Paul Eggert <address@hidden> wrote:

> On 01/08/2018 08:06 AM, Joerg Schilling wrote:
> > blkcnt_t st_blocks      Number of blocks allocated for this object.
> >
> > I hope I do not need to explain the term "allocated".
>
> I'm afraid that you do need to explain "allocated". Suppose, for 
> example, two files are clones: they have different inode numbers and are 
> different files from the POSIX point of view, but they have the same 
> contents and only one copy exists at the lower level. How many blocks 
> are "allocated" for each file?

POSIX does not explain what happens with several filesystems.

For this reason, I cannot see any reason why deduplication between different 
filesystems that share a common dataset should be alllowed to be visible at 
user level.

Also note that "du" may report more blocks than you expect in case it does not
have the ability to honor hard linked files.

The most important fact however is that allocating spade happens before you 
copy data into that space. A file with more data than what can be hold in the 
inode thus must have st_blocks > 0.

Jörg

-- 
 EMail:address@hidden                    (home) Jörg Schilling D-13353 Berlin
    address@hidden (work) Blog: http://schily.blogspot.com/
 URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]