Return-Path: Received: from us-smtp-delivery-194.mimecast.com ([216.205.24.194]:34698 "EHLO us-smtp-delivery-194.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932268AbcJGQVg (ORCPT ); Fri, 7 Oct 2016 12:21:36 -0400 From: Trond Myklebust To: NeilBrown CC: Schumaker Anna , List Linux NFS Mailing Subject: Re: [PATCH] NFS: Don't disconnect open-owner on NFS4ERR_BAD_SEQID Date: Fri, 7 Oct 2016 16:21:30 +0000 Message-ID: References: <87y46monel.fsf@notabene.neil.brown.name> <87bmyx3q3u.fsf@notabene.neil.brown.name> In-Reply-To: <87bmyx3q3u.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: DQo+IE9uIE9jdCA2LCAyMDE2LCBhdCAyMToyNywgTmVpbEJyb3duIDxuZWlsYkBzdXNlLmNvbT4g d3JvdGU6DQo+IA0KPiANCj4gSGkgYWdhaW4sDQo+IEkgcG9zdGVkIGEgdmVyc2lvbiBvZiB0aGlz IHBhdGNoIDQgbW9udGhzIGFuZCBnb3Qgbm8gcmVwbHksIHNvDQo+IHRob3VnaHQgaXQgbWlnaHQg YmUgdGltZSB0byB0cnkgYWdhaW4uDQo+IFRoaXMgdmVyc2lvbiBpbmNsdWRlcyBhIHNtYWxsIGNo YW5nZSB0byBoYW5kbGUgdGhlIGNhc2Ugd2hlbiBhDQo+IGRlbGVnYXRpb24gc3RhdGVpZCBnZXRz IGEgQkFEX1NUQVRFSUQsIGluIHRoZSBjb250ZXh0IG9mIHRoZSBvcGVuLW93bmVyDQo+IGdldHRp bmcgYSBCQURfU0VRSUQuDQo+IE9idmlvdXNseSB0aGlzIHdob2xlIGlzc3VlIGNhbiBvbmx5IGhh cHBlbiBpZiB0aGUgc2VydmVyIGlzIGJ1Z2d5IChvcg0KPiBpZiB0aGUgY2xpZW50IGlzIGJ1Z2d5 LCBidXQgSSBkb24ndCB0aGluay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