Return-Path: Received: from mail-sn1nam02on0124.outbound.protection.outlook.com ([104.47.36.124]:16128 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752645AbeFYQp6 (ORCPT ); Mon, 25 Jun 2018 12:45:58 -0400 From: Trond Myklebust To: "chucklever@gmail.com" CC: "bfields@fieldses.org" , "linux-nfs@vger.kernel.org" , "manjunath.b.patil@oracle.com" Subject: Re: [PATCH 2/2] nfsd: return ENOSPC if unable to allocate a session slot Date: Mon, 25 Jun 2018 16:45:55 +0000 Message-ID: <3ab59d77e9e3a9d462a07d09964cdfc1e491f998.camel@hammerspace.com> References: <1529598933-16506-1-git-send-email-manjunath.b.patil@oracle.com> <1529598933-16506-2-git-send-email-manjunath.b.patil@oracle.com> <20180622175416.GA7119@fieldses.org> <148E65CF-D3D4-4E43-A190-822C5F7824B9@gmail.com> <180d25ce5474539f15a84a23258d15c71ec11ad9.camel@hammerspace.com> <1131E2BE-162D-45BB-BC24-49097733ACC3@gmail.com> In-Reply-To: <1131E2BE-162D-45BB-BC24-49097733ACC3@gmail.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gTW9uLCAyMDE4LTA2LTI1IGF0IDExOjM5IC0wNDAwLCBDaHVjayBMZXZlciB3cm90ZToNCj4g PiBPbiBKdW4gMjQsIDIwMTgsIGF0IDk6NTYgQU0sIFRyb25kIE15a2xlYnVzdCA8dHJvbmRteUBo YW1tZXJzcGFjZS5jDQo+ID4gb20+IHdyb3RlOg0KPiA+IA0KPiA+IE9uIFNhdCwgMjAxOC0wNi0y MyBhdCAxNTowMCAtMDQwMCwgQ2h1Y2sgTGV2ZXIgd3JvdGU6DQo+ID4gPiA+IE9uIEp1biAyMiwg MjAxOCwgYXQgNjozMSBQTSwgVHJvbmQgTXlrbGVidXN0IDx0cm9uZG15QGhhbW1lcnNwYQ0KPiA+ ID4gPiBjZS5j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