what are st_blksize and st_blocks exactly?

Jeff Berkowitz jjb at sequent.UUCP
Mon Jul 16 03:31:21 AEST 1990


In article <138932 at sun.Eng.Sun.COM> lm at sun.UUCP (Larry McVoy) writes:
>
>st_blksize is the file system block size, usually 8K on BSD derived systems.

Watch out for this "usually 8K" assumption; it has caused no end of grief.
I worked on a file system recently which was based on variable length
extents; I could have supplied just about any value in this field, because
there were no fixed sized blocks aside from the underlying sectors.

So I tried 64k in the field, because of the comment about it being the
"ideal" block size (64k was the optimal performance point for the device).

This caused strange things to happen; some programs broke, others developed
performance problems.  For example, there were utilities that based their
buffering on "2 x st_blksize", but never really intended to have 1/8M of
buffer space :-).  Eventually I went back to 8k.
-- 
Jeff Berkowitz N6QOM	  uunet!sequent!jjb	| Bugs are God's way of saying
Sequent Computer Systems    			| you have too much free time.



More information about the Comp.unix.wizards mailing list