Re: [PATCH v14 14/25] nfs_common: add NFS LOCALIO auxiliary protocol enablement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Aug 2024, Mike Snitzer wrote:

> +
> +bool nfs_uuid_is_local(const uuid_t *uuid, struct net *net, struct auth_domain *dom)
> +{
> +	bool is_local = false;
> +	nfs_uuid_t *nfs_uuid;
> +
> +	rcu_read_lock();
> +	nfs_uuid = nfs_uuid_lookup(uuid);
> +	if (nfs_uuid) {
> +		nfs_uuid->net = maybe_get_net(net);

I know I said it looked wrong to be getting a ref for the domain but not
the net - and it did.  But that doesn't mean the fix was to get a ref
for the net and to hold it indefinitely.

This ref is now held until the client happens to notice that localio
doesn't work any more (because nfsd_serv_try_get() fails).  So the
shutdown of a net namespace will be delayed indefinitely if the NFS
filesystem isn't being actively used.

I would prefer that there were a way for the net namespace to reach back
into the client and disconnect itself.  Probably this would be a
linked-list in struct nfsd_net which linked list_heads in struct
nfs_client.  This list would need to be protected by a spinlock -
probably global in nfs_common so client could remove itself and server
could remove all clients after clearing their net pointers.

It is probably best if I explain all of what I am thinking as a patch.

Stay tuned.

NeilBrown





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux