Linux NFS development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: Anna Schumaker <anna@kernel.org>, Trond Myklebust <trondmy@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 0/3] NFS/localio: make the LOCALIO probe safe, repeatable and bounded
Date: Mon,  2 Nov 2026 16:52:17 -0500	[thread overview]
Message-ID: <20261102215220.16055-1-snitzer@kernel.org> (raw)

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
-- 
2.52.0


             reply	other threads:[~2026-11-02 21:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 21:52 Mike Snitzer [this message]
2026-11-02 21:52 ` [PATCH 1/3] NFS/localio: hold the client across an asynchronous LOCALIO probe Mike Snitzer
2026-11-02 21:52 ` [PATCH 2/3] NFS/localio: probe again for LOCALIO when localio_enabled is set to Y Mike Snitzer
2026-11-02 21:52 ` [PATCH 3/3] NFS/localio: give the LOCALIO probe a short timeout of its own Mike Snitzer
2026-11-06 22:02   ` Anna Schumaker
2026-11-09 15:10     ` Mike Snitzer
2026-11-09 15:57       ` Anna Schumaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261102215220.16055-1-snitzer@kernel.org \
    --to=snitzer@kernel.org \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox