You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(local): read filesystem I/O block size for optimal operations
Query the filesystem to determine optimal I/O block size rather than
using a hardcoded 4096 value. This improves alignment with underlying
storage characteristics.
Block size detection (Unix):
- statfs.Bsize: Filesystem's fundamental block size
- stat.Blksize: Preferred I/O block size for the file/directory
- Use minimum of both with bounds checking (0 < size <= MaxInt32)
- Default to 4096 if detection fails
The IOBlockSize is exposed through fs.Usage and propagated to:
- FUSE statfs responses (Bsize, Frsize fields)
- File attribute block calculations
- VFS via GetBlockSizes() returning (dataBlockSize=512, ioBlockSize)
Union backend aggregates by taking minimum across all upstreams,
ensuring conservative alignment for heterogeneous storage.
Windows defaults to 4096 as the statfs equivalent doesn't provide
preferred I/O size information.
Signed-off-by: Anagh Kumar Baranwal <[email protected]>
0 commit comments