Commit 81c3047f authored by Aaron Jacobs's avatar Aaron Jacobs

Revised the public StatFSOp docs for the BlockSize/IoSize split.

parent e59a45f1
...@@ -46,13 +46,14 @@ type StatFSOp struct { ...@@ -46,13 +46,14 @@ type StatFSOp struct {
// with the block counts below, by callers of statfs(2) to infer the file // with the block counts below, by callers of statfs(2) to infer the file
// system's capacity and space availability. // system's capacity and space availability.
// //
// On Linux this can be any value, which will be faitfully returned to the // On Linux this is surfaced as statfs::f_frsize, matching the posix standard
// caller of statfs(2) (see the code walk above). On OS X it appears it must // (http://goo.gl/LktgrF), which says that f_blocks and friends are in units
// be a power of 2 in [2^9, 2^17]. // of f_frsize. On OS X this is surfaced as statfs::f_bsize, which plays the
// same roll.
// //
// On OS X this also affects statfs::f_iosize, which is documented as the // On Linux this can be any value, and will be faithfully returned to the
// "optimal transfer block size". It does not appear to cause osxfuse to // caller of statfs(2) (see the code walk above). On OS X it appears it must
// change the size of data in WriteFile ops, though. // be a power of 2 in the range [2^9, 2^17].
// //
// This interface does not distinguish between blocks and block fragments. // This interface does not distinguish between blocks and block fragments.
BlockSize uint32 BlockSize uint32
...@@ -67,6 +68,17 @@ type StatFSOp struct { ...@@ -67,6 +68,17 @@ type StatFSOp struct {
BlocksFree uint64 BlocksFree uint64
BlocksAvailable uint64 BlocksAvailable uint64
// The preferred size of writes to and reads from the file system, in bytes.
// This may affect clients that use statfs(2) to size buffers correctly.
//
// On Linux this is surfaced as statfs::f_bsize, and on OS X as
// statfs::f_iosize. Both are documented in `man 2 statfs` as "optimal
// transfer block size".
//
// On Linux this can be any value. On OS X it appears it must be a power of 2
// in the range [2^9, 2^20].
IoSize uint32
// The total number of inodes in the file system, and how many remain free. // The total number of inodes in the file system, and how many remain free.
Inodes uint64 Inodes uint64
InodesFree uint64 InodesFree uint64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment