What, exactly, are stat.st_blocks, statfs.f_bsize?

Michael Davidson md at sco.COM
Sat Mar 2 08:38:54 AEST 1991


jik at athena.mit.edu (Jonathan I. Kamens) writes:

>  And, on a historical note, what led to the decision to measure in terms of
>512-byte blocks, and why do some sites measure in terms of 1k blocks instead?

I'm sure that, like most design decisions, it was essentially
arbitrary. It was, however, a very natural choice in the context
of the machines on which the early UNIX filesystems were implemented.
These machines had small disks with a physical sector size of 512 bytes
and small amounts of main memory. So, 512 bytes was a natural choice.

Try reading some of Ritchie and Thompson's papers on UNIX for an
introduction to the design philosophy (Bell System Technical Journal
for July-August 1978 is a good place to start).

A more interesting question is "why did it stay that way so long ..."



More information about the Comp.unix.wizards mailing list