linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chucklever@gmail.com>
To: Bruce Fields <bfields@fieldses.org>
Cc: Manjunath Patil <manjunath.b.patil@oracle.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] nfsd: return ENOSPC if unable to allocate a session slot
Date: Fri, 22 Jun 2018 17:49:34 -0400	[thread overview]
Message-ID: <148E65CF-D3D4-4E43-A190-822C5F7824B9@gmail.com> (raw)
In-Reply-To: <20180622175416.GA7119@fieldses.org>

Hi Bruce-


> On Jun 22, 2018, at 1:54 PM, J. Bruce Fields <bfields@fieldses.org> =
wrote:
>=20
> On Thu, Jun 21, 2018 at 04:35:33PM +0000, Manjunath Patil wrote:
>> Presently nfserr_jukebox is being returned by nfsd for create_session
>> request if server is unable to allocate a session slot. This may be
>> treated as NFS4ERR_DELAY by the clients and which may continue to =
re-try
>> create_session in loop leading NFSv4.1+ mounts in hung state. nfsd
>> should return nfserr_nospc in this case as per =
rfc5661(section-18.36.4
>> subpoint 4. Session creation).
>=20
> I don't think the spec actually gives us an error that we can use to =
say
> a CREATE_SESSION failed permanently for lack of resources.

The current situation is that the server replies NFS4ERR_DELAY,
and the client retries indefinitely. The goal is to let the
client choose whether it wants to try the CREATE_SESSION again,
try a different NFS version, or fail the mount request.

Bill and I both looked at this section of RFC 5661. It seems to
us that the use of NFS4ERR_NOSPC is appropriate and unambiguous
in this situation, and it is an allowed status for the
CREATE_SESSION operation. NFS4ERR_DELAY OTOH is not helpful.


> Better would be to avoid the need to fail at all.

That would be good too.


>  Possibilities:
>=20
> 	- revive Trond's patches some time back to do dynamic slot size
> 	  renegotiation
> 	- make sure the systems you're testing on already have
> 	  de766e570413 and 44d8660d3bb0 applied.
> 	- further liberalise the limits here: do we need them at all, or
> 	  should we just wait till a kmalloc fails?  Or maybe take a
> 	  hybrid approach?: e.g. allow an arbitrary number of clients
> 	  and only limit slots & slotsizes.

> --b.
>=20
>>=20
>> Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
>> ---
>> fs/nfsd/nfs4state.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>=20
>> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
>> index 8571414..3734e08 100644
>> --- a/fs/nfsd/nfs4state.c
>> +++ b/fs/nfsd/nfs4state.c
>> @@ -2716,7 +2716,7 @@ static __be32 check_forechannel_attrs(struct =
nfsd4_channel_attrs *ca, struct nfs
>> 	 */
>> 	ca->maxreqs =3D nfsd4_get_drc_mem(ca);
>> 	if (!ca->maxreqs)
>> -		return nfserr_jukebox;
>> +		return nfserr_nospc;
>>=20
>> 	return nfs_ok;
>> }
>> --=20
>> 1.8.3.1
>>=20
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever
chucklever@gmail.com




  reply	other threads:[~2018-06-22 21:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 16:35 [PATCH 1/2] nfsv4: handle ENOSPC during create session Manjunath Patil
2018-06-21 16:35 ` [PATCH 2/2] nfsd: return ENOSPC if unable to allocate a session slot Manjunath Patil
2018-06-22 17:54   ` J. Bruce Fields
2018-06-22 21:49     ` Chuck Lever [this message]
2018-06-22 22:31       ` Trond Myklebust
2018-06-22 23:10         ` Trond Myklebust
2018-06-23 19:00         ` Chuck Lever
2018-06-24 13:56           ` Trond Myklebust
2018-06-25 15:39             ` Chuck Lever
2018-06-25 16:45               ` Trond Myklebust
2018-06-25 17:03               ` Manjunath Patil
2018-06-24 20:26     ` J. Bruce Fields
     [not found]       ` <bde64edc-5684-82d7-4488-e2ebdd7018fc@oracle.com>
2018-06-25 22:04         ` J. Bruce Fields
2018-06-26 17:20           ` Manjunath Patil
2018-07-09 14:25     ` J. Bruce Fields
2018-07-09 21:57       ` Trond Myklebust
2018-06-21 17:04 ` [PATCH 1/2] nfsv4: handle ENOSPC during create session Trond Myklebust
2018-06-22 14:28   ` Manjunath Patil

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=148E65CF-D3D4-4E43-A190-822C5F7824B9@gmail.com \
    --to=chucklever@gmail.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=manjunath.b.patil@oracle.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;
as well as URLs for NNTP newsgroup(s).