diff --git a/fuseops/ops.go b/fuseops/ops.go index eee34c5..dfd62c6 100644 --- a/fuseops/ops.go +++ b/fuseops/ops.go @@ -46,13 +46,14 @@ type StatFSOp struct { // with the block counts below, by callers of statfs(2) to infer the file // system's capacity and space availability. // - // On Linux this can be any value, which will be faitfully returned to the - // caller of statfs(2) (see the code walk above). On OS X it appears it must - // be a power of 2 in [2^9, 2^17]. + // On Linux this is surfaced as statfs::f_frsize, matching the posix standard + // (http://goo.gl/LktgrF), which says that f_blocks and friends are in units + // 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 - // "optimal transfer block size". It does not appear to cause osxfuse to - // change the size of data in WriteFile ops, though. + // On Linux this can be any value, and will be faithfully returned to the + // caller of statfs(2) (see the code walk above). On OS X it appears it must + // be a power of 2 in the range [2^9, 2^17]. // // This interface does not distinguish between blocks and block fragments. BlockSize uint32 @@ -67,6 +68,17 @@ type StatFSOp struct { BlocksFree 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. Inodes uint64 InodesFree uint64