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: Paul Eggert
Subject: Re: [Bug-tar] Detection of sparse files is broken on btrfs
Date: Mon, 8 Jan 2018 08:47:13 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

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?

The whole idea of "allocated" is not explained in the POSIX standard, and it's up to each implementation to decide what it means. For example, an implementation is perfectly free to spontaneously "allocate" one more block for a file, as far as POSIX is concerned. I haven't yet seen any reason why the behavior described for btrs fails to conform to POSIX.




reply via email to

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