|
From: | Joerg Schilling |
Subject: | Re: [Bug-tar] stat() on btrfs reports the st_blocks with delay (data loss in archivers) |
Date: | Wed, 6 Jul 2016 16:53:25 +0200 |
User-agent: | Heirloom mailx 12.5 7/5/10 |
Antonio Diaz Diaz <address@hidden> wrote: > Joerg Schilling wrote: > > POSIX requires st_blocks to be != 0 in case that the file contains data. > > Please, could you provide a reference? I can't find such requirement at > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html blkcnt_t st_blocks Number of blocks allocated for this object. It should be obvious that a file that offers content also has allocated blocks. Blocks are "allocated" when the OS decides whether the new data will fit on the medium. The fact that some filesystems may have data in a cache but not yet on the medium does not matter here. This is how UNIX worked since st_block has been introduced nearly 40 years ago. A new filesystem cannot introduce new rules just because people believe it would save time. 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://sourceforge.net/projects/schilytools/files/'
[Prev in Thread] | Current Thread | [Next in Thread] |