Skip to content

RFC improve some nfsd_mutex locking

NeilBrown linux-nfs llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nfsd: provide proper locking for all write_ functionfs/nfsd/nfsctl.c+14 -01 reply
2/3nfsd: use kref and new mutex for global config managementfs/nfsd/export.c fs/nfsd/filecache.c fs/nfsd/nfsd.h +1 more+41 -400 replies
3/3nfsd: split nfsd_mutex into one mutex per net-namespace.Documentation/admin-guide/nfs/nfsd-admin-interfaces.rst fs/nfsd/netns.h fs/nfsd/nfsctl.c +4 more+73 -1370 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchLi Lingfeng
1/3T-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3 RFC] improve some nfsd_mutex locking

The first patch hopefully fixes a bug with locking as reported by Li
Lingfeng: some write_foo functions aren't locked properly.

The other two improve the locking code, particulary so that we don't need a global mutex to change per-netns data.

I've revised the locking to use guard(mutex) for (almost) all places that the per-netfs mutex is used. I think this is an improvement but would like to know what others think.

I haven't changed _get/_put to _pin/_unpin as Chuck wondered about. I'm not against that (though get/put are widely understood) but nor am I particularly for it yet. Again, opinions are welcome.

NeilBrown

[PATCH 1/3] nfsd: provide proper locking for all write_ function [PATCH 2/3] nfsd: use kref and new mutex for global config management [PATCH 3/3] nfsd: split nfsd_mutex into one mutex per net-namespace.