Antonio Diaz Diaz <anto...@gnu.org> 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:jo...@schily.net (home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/' -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html