Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: Omar Sandoval <osandov@osandov.com>,
	Sargun Dillon <sargun@sargun.me>,
	 linux-nfs@vger.kernel.org, linux-kernel@vger.keornel.org
Subject: Re: [PATCH v2 0/2] nfs: don't share pNFS DS connections between net namespaces
Date: Mon, 21 Apr 2025 09:30:46 -0400	[thread overview]
Message-ID: <90c00a85362940d06eab4bb864b686b9842411a9.camel@kernel.org> (raw)
In-Reply-To: <20250410-nfs-ds-netns-v2-0-f80b7979ba80@kernel.org>

On Thu, 2025-04-10 at 16:42 -0400, Jeff Layton wrote:
> Sargun noted that he had seen some cases where a dead netns with a stuck
> NFS mount in it would affect other containers. Omar took a look last
> week and noted that there was a global list of DS connections and there
> was no segregation by namespace.
> 
> The first patch in the series fixes this in a minimal way by tracking
> struct net in the nfs4_pnfs_ds structure and not matching it when the
> caller's net is different. The second patch goes the rest of the way,
> and makes the nfs4_data_server_cache and lock be per-net.
> 
> My thought was that the first patch should be suitable for stable
> kernels, and both could go to mainline. If you think the risk is low
> though, we could just squash the two together.
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> Changes in v2:
> - fix build break when IS_ENABLED(CONFIG_NFS_V4_1) is false
> - Link to v1: https://lore.kernel.org/r/20250410-nfs-ds-netns-v1-0-cc6236e84190@kernel.org
> 
> ---
> Jeff Layton (2):
>       nfs: don't share pNFS DS connections between net namespaces
>       nfs: move the nfs4_data_server_cache into struct nfs_net
> 
>  fs/nfs/client.c                           |  7 +++++++
>  fs/nfs/filelayout/filelayoutdev.c         |  6 +++---
>  fs/nfs/flexfilelayout/flexfilelayoutdev.c |  6 +++---
>  fs/nfs/netns.h                            |  6 +++++-
>  fs/nfs/pnfs.h                             |  4 +++-
>  fs/nfs/pnfs_nfs.c                         | 32 +++++++++++++++++--------------
>  6 files changed, 39 insertions(+), 22 deletions(-)
> ---
> base-commit: cf03f570936ac96ed4775eb2e4f1a6ab6a13f143
> change-id: 20250410-nfs-ds-netns-321c78c16a79
> 
> Best regards,

Trond,

Does this set look reasonable for v6.15?

Thanks,
-- 
Jeff Layton <jlayton@kernel.org>

      parent reply	other threads:[~2025-04-21 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 20:42 [PATCH v2 0/2] nfs: don't share pNFS DS connections between net namespaces Jeff Layton
2025-04-10 20:42 ` [PATCH v2 1/2] " Jeff Layton
2025-04-11 13:57   ` Benjamin Coddington
2025-04-11 14:10     ` Jeff Layton
2025-04-10 20:42 ` [PATCH v2 2/2] nfs: move the nfs4_data_server_cache into struct nfs_net Jeff Layton
2025-04-11 14:08   ` Benjamin Coddington
2025-04-21 13:30 ` Jeff Layton [this message]

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=90c00a85362940d06eab4bb864b686b9842411a9.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=anna@kernel.org \
    --cc=linux-kernel@vger.keornel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=osandov@osandov.com \
    --cc=sargun@sargun.me \
    --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