Linux NFS development
 help / color / mirror / Atom feed
From: Anna Schumaker <anna@kernel.org>
To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com
Cc: anna@kernel.org
Subject: [PATCH 0/5] NFS: Clean up NFS version module loading
Date: Tue,  1 Oct 2024 16:33:39 -0400	[thread overview]
Message-ID: <20241001203344.327044-1-anna@kernel.org> (raw)

From: Anna Schumaker <anna.schumaker@oracle.com>

I noticed that I initally coded this to use a linked list instead of
an array. This adds a lot of extra "search the list" work that we don't
need to do since we'll always know the (integer) NFS version number that
we are looking for.

While I'm here, I cleaned up the locking to use a reader-write lock
matching how the VFS does things. I also renamed get_nfs_version() to
find_nfs_version(), and implemented a new get_nfs_version() that
abstracts out taking the module reference and acts as the opposite of
put_nfs_version()

Anna


Anna Schumaker (5):
  NFS: Clean up locking the nfs_versions list
  NFS: Convert the NFS module list into an array
  NFS: Rename get_nfs_version() -> find_nfs_version()
  NFS: Clean up find_nfs_version()
  NFS: Implement get_nfs_version()

 fs/nfs/client.c     | 64 ++++++++++++++++++++++++---------------------
 fs/nfs/fs_context.c |  6 ++---
 fs/nfs/namespace.c  |  2 +-
 fs/nfs/nfs.h        |  4 +--
 4 files changed, 40 insertions(+), 36 deletions(-)

2.46.2


             reply	other threads:[~2024-10-01 20:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 20:33 Anna Schumaker [this message]
2024-10-01 20:33 ` [PATCH 1/5] NFS: Clean up locking the nfs_versions list Anna Schumaker
2024-10-01 20:33 ` [PATCH 2/5] NFS: Convert the NFS module list into an array Anna Schumaker
2024-10-01 20:33 ` [PATCH 3/5] NFS: Rename get_nfs_version() -> find_nfs_version() Anna Schumaker
2024-10-01 20:33 ` [PATCH 4/5] NFS: Clean up find_nfs_version() Anna Schumaker
2024-10-01 20:33 ` [PATCH 5/5] NFS: Implement get_nfs_version() 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=20241001203344.327044-1-anna@kernel.org \
    --to=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /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