Page MenuHomeFreeBSD

fusefs: forward the server's reported optimal transfer size to statfs
Needs ReviewPublic

Authored by asomers on Feb 12 2021, 3:41 AM.

Details

Reviewers
cem
Summary

But don't report anything less than what we use for the buffer cache.

PR: 253424
Reported by: John Millikin <jmillikin@gmail.com>
MFC after: 1 week

Test Plan

Test cases added

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 36920
Build 33809: arc lint + arc unit

Event Timeline

sys/fs/fuse/fuse_vfsops.c
690–691

Does this make sense? I.e., should it just be f_iosize either way? Or should it be MIN()? I don't understand how iosize is used well enough, yet.

if iosize (aka maxbcachebuf) > fuse bsize: use larger maxbcachebuf for xfer efficiency
if iosize < fuse bsize: use smaller bcachebuf because it's the maximal bcache block size? Or does that not matter?

My guess is that these rarely conflict, but I don't know what the right thing to do at the edges is.

One thing we should verify is that f_iosize must be <= maxphys (see, e.g., kern/vfs_bio.c math for maxcl).

tests/sys/fs/fusefs/statfs.cc
211–215

As-written, I think this test would fail if vfs.macbcachebuf happened to be < 8192. I agree this is nonsense, but it's maybe worth calling out our environmental assumptions at least in a comment.