Mount option rdirplus extension
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest1 patch 0 repliesNew
- v31 patch 2 repliesSuperseded
- v21 patch 1 replySuperseded
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | NFS: Extend rdirplus mount option with "force|none"fs/ fs/ fs/ +1 more | +32 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/1] Mount option rdirplus extension
v2 - Instead of adding "force_rdirplus", extend rdirplus=force v3 - Fix broken bitwise operator
v4 - Fix /another/ borken bitwise op, reorder option emit
-------------
After these two changes:
1a34c8c9a49e NFS: Support larger readdir buffers
and85aa8ddc3818 NFS: Trigger the "ls -l" readdir heuristic sooner
.. we've disadvantaged/regressed some users workloads where the user is forced to use NFSv3 (such that we cannot prime the dcache with d_type on READDIR as we do for NFSv4), and where the workload is a search through a large directory tree. Previously, the smaller buffers and/or the larger heuristic size worked to their advantage to optimize the client toward the READDIRPLUS path.
We've been able to relieve some pain temporarily by putting a knob into sysfs to allow them to set the operation to one of:
- force READDIRPLUS
- disable READDIRPLUS
- use the default heurstic
That's exactly the solution they're looking for and we have most of that in mount options today with the "rdirplus" and "nordirplus". Missing only is the option to force the client to always use READDIR plus. What follows is a patch to do that by extending the existing rdirplus mount option to take values. I'll follow this up with a man page update to nfs-utils.
The global heuristic is always going to be wrong for some workloads and we cannnot depend on something like a mount-wide option to always work well for mixed workloads on the same mount. A realistic long-term solution involves allowing the applications to signal their intended behavior.
So, I am going to look at plumbing in a posix_fadvise() flag for READDIRPLUS. There's been some interest expressed already for other filesystems[1]. I plan to send along patches for this and face the discussions. However, that work will take some time to filter up into the utilities and into distros. In the meantime, I hope we can add this simpler mount option to help the folks that need the old behaviors in recent kernels.
Benjamin Coddington (1):
NFS: Extend rdirplus mount option with "force|none"
fs/nfs/dir.c | 2 ++ fs/nfs/fs_context.c | 32 ++++++++++++++++++++++++++++---- fs/nfs/super.c | 1 + include/linux/nfs_fs_sb.h | 1 + 4 files changed, 32 insertions(+), 4 deletions(-)
base-commit: 2408a807bfc3f738850ef5ad5e3fd59d66168996
Signature · 1 line
2.47.0