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: Thu, 18 Jan 2018 11:33:12 +0100
User-agent: Heirloom mailx 12.5 7/5/10

Andreas Dilger <address@hidden> wrote:

> > POSIX does not require you to call fsync() before you are able to get the
> > expected result from stat()
> > 
> > If POSIX did make such assumptions, it would document then. The fact that
> > there is no related text in POSIX is sufficient to prove what POSIX expects.
>
> I don't agree with your extrapolation at all.  You're saying that everything
> POSIX doesn't document must be forbidden, which is a big stretch.

You seem to missinterpret me.

POSIX requires things to be documented in case there is unexpected behavior.

Returning st_blocks == 0 for a file with at least 512 bytes of data is such 
unexpected behavior.

Returning a value for st_blocks, that changes with the phases of the moon while 
the content of that file is not changed is another unexpected behavior.

BTW: I remember that Sun started with a similar inconsistent approach (for 
statvfs() in this case) ~ 14 years ago, when efficiency for unlink() was 
increaded by implementing a background unlink(). Sun failed to pass the POSIX 
conformance tests with the first approach and had to change the implementation 
to returm more expectable results.

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]