From: Manjunath Patil <manjunath.b.patil@oracle.com>
To: Trond Myklebust <trondmy@hammerspace.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] nfsv4: handle ENOSPC during create session
Date: Fri, 22 Jun 2018 07:28:24 -0700 [thread overview]
Message-ID: <a1ef068f-57f3-6af1-4f94-7b4fc7a317ca@oracle.com> (raw)
In-Reply-To: <fcbb5bdcf513cd8aff17e33403688cf1cecdee3d.camel@hammerspace.com>
Thank you for your comments Trond. Let me come back with better version.
-Thanks,
Manjunath
On 6/21/2018 10:04 AM, Trond Myklebust wrote:
> On Thu, 2018-06-21 at 16:35 +0000, Manjunath Patil wrote:
>> Presently the client mount hangs for NFS4ERR_NOSPC repsonse from
>> server
>> during create session operation. Handle this error at the client side
>> and pass it back to user-space, which may chose to mount with lower
>> nfs
>> versions.
>>
>> Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
>> ---
>> fs/nfs/nfs4state.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
>> index 2bf2eaa..2134cf5 100644
>> --- a/fs/nfs/nfs4state.c
>> +++ b/fs/nfs/nfs4state.c
>> @@ -381,6 +381,8 @@ int nfs41_discover_server_trunking(struct
>> nfs_client *clp,
>> }
>> nfs4_schedule_state_manager(clp);
>> status = nfs_wait_client_init_complete(clp);
>> + if (!status) /* -ERESTARTSYS */
>> + status = nfs_client_init_status(clp);
> Nack... The trunking code is _not_ the place to do session error
> detection.
>
>> if (status < 0)
>> nfs_put_client(clp);
>> return status;
>> @@ -1919,6 +1921,9 @@ static int
>> nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status)
>> dprintk("%s: exit with error %d for server %s\n",
>> __func__, -EPROTONOSUPPORT, clp-
>>> cl_hostname);
>> return -EPROTONOSUPPORT;
>> + case -NFS4ERR_NOSPC:
>> + nfs_mark_client_ready(clp, status);
>> + /*fall through*/
> Nack... This would cause existing mounts to suddenly permanently fail.
>
>> case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
>> * in nfs4_exchange_id */
>> default:
>> @@ -2186,6 +2191,7 @@ int nfs4_discover_server_trunking(struct
>> nfs_client *clp,
>> case 0:
>> case -EINTR:
>> case -ERESTARTSYS:
>> + case -NFS4ERR_NOSPC:
>> break;
>> case -ETIMEDOUT:
>> if (clnt->cl_softrtry)
prev parent reply other threads:[~2018-06-22 14:28 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
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 [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=a1ef068f-57f3-6af1-4f94-7b4fc7a317ca@oracle.com \
--to=manjunath.b.patil@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@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;
as well as URLs for NNTP newsgroup(s).