[lkml]   [2003]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] comments on st_blksize and f_bsize for 2.5

On Mon, Feb 24, 2003 at 11:20:09AM +0100, Andries Brouwer wrote:

> The trivial part is st_blksize: all agree.
> Quoting the man page:
> The value st_blksize gives the "preferred" blocksize
> for efficient file system I/O. (Writing to a file in
> smaller chunks may cause an inefficient read-modify-rewrite.)

> The nontrivial part is f_bsize. As far as I can see
> BSD and SYSV and SUS all differ. And there are the use
> in struct statfs and the use in struct statvfs that are
> nonequivalent.
> Maybe BSD f_iosize, f_bsize in statfs corresponds to
> SYSV f_bsize, f_frsize in statfs. Linux is again a
> bit different.

Traditionally in Linux f_bsize in struct statfs is used as FS block size.
(e.g. df calculates fs capacity by multiplying amount of blocks on
fs by f_bsize).
Actually, this is the only field in struct statfs that holds any data regarding
fs blocksize. (well, some arches have f_frsize, but it is marked as unused).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.034 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site