Paul Eggert <egg...@cs.ucla.edu> wrote: > On 01/08/2018 08:54 AM, Joerg Schilling wrote: > > The most important fact however is that allocating spade happens before you > > copy data into that space. > > Certainly users need the ability to make sure there's enough room before > starting to copy, and POSIX allows for that with posix_fallocate. > However, I don't see any POSIX requirement that st_blocks has anything > to do with that room. For example, POSIX doesn't specify the size of the > units that st_blocks uses, and it even allows the unit size to vary > depending on the file. One cannot really deduce much of anything from > st_blocks, if the goal is portability to any POSIX implementation.
POSIX explains that st_blocks counts in units of DEV_BSIZE. 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://sf.net/projects/schilytools/files/'