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:48:21 +0100
User-agent: Heirloom mailx 12.5 7/5/10

Adam Borowski <address@hidden> wrote:

> A file that doesn't have a single block allocated for it may thus return
> st_blocks of 0, no matter if it's empty or not.

_before_ you may add data to a file, you need to allocate space for it.
This is what POSIX requires to return with a stat() call.

For this reason, it is impossible that st_blocks is 0 and the file contains 
at least 512 bytes of data.

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]