linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nfs-utils] mount: handle ENOSPC in nfs_autonegotiate()
@ 2018-06-21 16:34 Manjunath Patil
  2018-06-21 16:59 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Manjunath Patil @ 2018-06-21 16:34 UTC (permalink / raw)
  To: linux-nfs; +Cc: manjunath.b.patil

The server may return NFS4ERR_NOSPC during NFSv4.1+ mount if there is a
memory pressure to allocate a DRC slot for session being created. In
such cases, try with lower nfs versions, which may succeed as DRC is
shared by clients.

Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
---
 utils/mount/stropts.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index d1b0708..7e97a88 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -881,6 +881,10 @@ check_result:
 	case EINVAL:
 		/* A less clear indication that our client
 		 * does not support NFSv4 minor version. */
+	case ENOSPC:
+		/* Server returned NFS4ERR_NOSPC for create session [NFSv4.1+].
+		 * Try with lower NFS versions which share DRC amoung clients and
+		 * hence low memory may be ok. */
 	case EACCES:
 		/* An unclear indication that the server
 		 * may not support NFSv4 minor version. */
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH nfs-utils] mount: handle ENOSPC in nfs_autonegotiate()
  2018-06-21 16:34 [PATCH nfs-utils] mount: handle ENOSPC in nfs_autonegotiate() Manjunath Patil
@ 2018-06-21 16:59 ` Trond Myklebust
  2018-06-25 15:32   ` Steve Dickson
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2018-06-21 16:59 UTC (permalink / raw)
  To: linux-nfs, manjunath.b.patil

T24gVGh1LCAyMDE4LTA2LTIxIGF0IDA5OjM0IC0wNzAwLCBNYW5qdW5hdGggUGF0aWwgd3JvdGU6
DQo+IFRoZSBzZXJ2ZXIgbWF5IHJldHVybiBORlM0RVJSX05PU1B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E5GUyB2ZXJzaW9ucyB3aGljaCBzaGFyZSBEUkMNCj4g
YW1vdW5nIGNsaWVudHMgYW5kDQo+ICsJCSAqIGhlbmNlIGxvdyBtZW1vcnkgbWF5IGJlIG9rLiAq
Lw0KPiAgCWNhc2UgRUFDQ0VTOg0KPiAgCQkvKiBBbiB1bmNsZWFyIGluZGljYXRpb24gdGhhdCB0
aGUgc2VydmVyDQo+ICAJCSAqIG1heSBub3Qgc3VwcG9ydCBORlN2NCBtaW5vciB2ZXJzaW9uLiAq
Lw0KDQpUaGlzIGNvbW1lbnQgbWFrZXMgbm8gc2Vuc2UuIE5GU3Y0LjEgc2VydmVycyBhbHNvIHNo
YXJlIG1lbW9yeSBiZXR3ZWVuDQpjbGllbnRzLCBhbmQgdW5saWtlIG9sZGVyIHZlcnNpb25zIG9m
IE5GUywgdGhleSBoYXZlIHdheXMgdG8gcmVjbGFpbQ0KdGhhdCBtZW1vcnkgKHNlZSBDQl9SRUNB
TExfU0xPVCkuDQoNCi0tIA0KVHJvbmQgTXlrbGVidXN0DQpMaW51eCBORlMgY2xpZW50IG1haW50
YWluZXIsIEhhbW1lcnNwYWNlDQp0cm9uZC5teWtsZWJ1c3RAaGFtbWVyc3BhY2UuY29tDQoNCg==

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH nfs-utils] mount: handle ENOSPC in nfs_autonegotiate()
  2018-06-21 16:59 ` Trond Myklebust
@ 2018-06-25 15:32   ` Steve Dickson
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2018-06-25 15:32 UTC (permalink / raw)
  To: Trond Myklebust, linux-nfs, manjunath.b.patil



On 06/21/2018 12:59 PM, Trond Myklebust wrote:
> On Thu, 2018-06-21 at 09:34 -0700, Manjunath Patil wrote:
>> The server may return NFS4ERR_NOSPC during NFSv4.1+ mount if there is
>> a
>> memory pressure to allocate a DRC slot for session being created. In
>> such cases, try with lower nfs versions, which may succeed as DRC is
>> shared by clients.
>>
>> Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
>> ---
>>  utils/mount/stropts.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
>> index d1b0708..7e97a88 100644
>> --- a/utils/mount/stropts.c
>> +++ b/utils/mount/stropts.c
>> @@ -881,6 +881,10 @@ check_result:
>>  	case EINVAL:
>>  		/* A less clear indication that our client
>>  		 * does not support NFSv4 minor version. */
>> +	case ENOSPC:
>> +		/* Server returned NFS4ERR_NOSPC for create session
>> [NFSv4.1+].
>> +		 * Try with lower NFS versions which share DRC
>> amoung clients and
>> +		 * hence low memory may be ok. */
>>  	case EACCES:
>>  		/* An unclear indication that the server
>>  		 * may not support NFSv4 minor version. */
> 
> This comment makes no sense. NFSv4.1 servers also share memory between
> clients, and unlike older versions of NFS, they have ways to reclaim
> that memory (see CB_RECALL_SLOT).
> 
So this is a NACK to this patch... just to make it official

steved.
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-25 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21 16:34 [PATCH nfs-utils] mount: handle ENOSPC in nfs_autonegotiate() Manjunath Patil
2018-06-21 16:59 ` Trond Myklebust
2018-06-25 15:32   ` Steve Dickson

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).