In message <5554b8d6.1010...@mu.org>, Alfred Perlstein writes:
>Shouldn't most of these be using st.st_blksize ?
We had a long discussion about that back when GEOM was young and the
conclusionis that st_blksize doesn't tell you anything useful
and generally does the wrong thing, in particular on non-native
filesystems like msdosfs and cd9660.
But the world is more complex than even that.
For instance on a RAID-5 volume, you want to write stripe-width
chunks, properly aligned, no matter what the st_blksize might be
in your filesystem. Unless your filesystem is guaranteed to lay
out sequentially, you would have to ask before each write.
Other filesystems may have opinions about read-sizes (ie: NFS).
The only sane way to do this properly would be to ask each
individual file with fcntl(2) for preferred read or write
You could then have embedded system mount filesystems with
and servers instead use
But for most practical purposes, having a sane constant BUFSIZ is
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
email@example.com mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"