NFS/localio: make the LOCALIO probe safe, repeatable and bounded
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | NFS/localio: hold the client across an asynchronous LOCALIO probefs/ | +10 | 0 replies | |
| 2/3 | NFS/localio: probe again for LOCALIO when localio_enabled is set to YDocumentation/ fs/ | +53 | 0 replies | |
| 3/3 | NFS/localio: give the LOCALIO probe a short timeout of its ownDocumentation/ fs/ | +60 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] NFS/localio: make the LOCALIO probe safe, repeatable and bounded
Hi,
Three fixes to the LOCALIO probe.
Patch 1 takes a reference on the client when nfs_local_probe_async() queues cl_local_probe_work, and drops it once the work has run. The work was queued without one, so a client freed with a probe queued (e.g. at umount after an NFSv3 I/O queued a throttled probe) left the work to run on freed memory.
Patch 2 probes again when localio_enabled is set back to Y. A client that probed while localio_enabled was N was disabled by the probe, and nothing probed it again, so it stayed on the network. Setting localio_enabled to Y now queues a probe for every ready client, in every network namespace, that does not use LOCALIO.
Patch 3 gives the probe a short soft timeout of its own. The probe's NULL ping and UUID_IS_LOCAL used the mount's timeout, so with timeo=600 a server that does not answer the LOCALIO program held each probe for about 170 s. The new nfs module parameter localio_timeout (seconds, 10 by default, at most 600; 0 keeps the mount's timeouts) bounds it: through a proxy dropping every LOCALIO call the probe gave up after 10.6 s, and logged nothing.
The series is based on Anna's linux-next (nfs-for-7.4-1).
Thanks,
Mike
Mike Snitzer (3):
NFS/localio: hold the client across an asynchronous LOCALIO probe NFS/localio: probe again for LOCALIO when localio_enabled is set to Y NFS/localio: give the LOCALIO probe a short timeout of its own
Documentation/filesystems/nfs/localio.rst | 12 +++ fs/nfs/localio.c | 118 ++++++++++++++++++++-- 2 files changed, 123 insertions(+), 7 deletions(-)
base-commit: ef30b3efb7e8bae94d790a6503a595e1051323e7
Signature · 1 line
2.52.0