Messages in this thread | | | Date | Sun, 26 Sep 2004 02:41:31 +0900 (JST) | Subject | Re: [2.6] smbfs & "du" illness | From | YOSHIFUJI Hideaki / 吉藤英明 <> |
| |
Hello.
In article <20040925171104.GN580@jeremy1> (at Sat, 25 Sep 2004 10:11:04 -0700), Jeremy Allison <jra@samba.org> says:
> > And yes, that's a _fixed_ blocksize. When you use "stat()", and you look > > at "st_blocks", it's ALWAYS in 512-byte entities. It doesn't matter that > > "st_blksize" might be something else - when UNIX counts blocks, it counts > > them in 512-byte chunks. > > st_blocks and st_blksize are not in the POSIX spec : > That's why I got so pissed with the extensions spec > as it didn't specify a unit size. Rather an assume > "all the world is 512" which is plainly wrong, I > decided to make it a unit of bytes on the wire. > The client can then return in the correct blocksize > for it's own system.
http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html#tag_13_62
|The unit for the st_blocks member of the stat structure is not |defined within IEEE Std 1003.1-2001. In some implementations it |is 512 bytes. It may differ on a file system basis. There is no |correlation between values of the st_blocks and st_blksize, and |the f_bsize (from <sys/statvfs.h>) structure members.
--yoshfuji - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |