Return-Path: Received: from mail-eopbgr720130.outbound.protection.outlook.com ([40.107.72.130]:1384 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727701AbeJEUek (ORCPT ); Fri, 5 Oct 2018 16:34:40 -0400 From: Trond Myklebust To: "anna.schumaker@netapp.com" , "olga.kornievskaia@gmail.com" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH 1/1] NFSv4.x: fix lock recovery during delegation recall Date: Fri, 5 Oct 2018 13:35:39 +0000 Message-ID: References: <20181004184500.14403-1-olga.kornievskaia@gmail.com> In-Reply-To: <20181004184500.14403-1-olga.kornievskaia@gmail.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVGh1LCAyMDE4LTEwLTA0IGF0IDE0OjQ1IC0wNDAwLCBPbGdhIEtvcm5pZXZza2FpYSB3cm90 ZToNCj4gRnJvbTogT2xnYSBLb3JuaWV2c2thaWEgPGtvbGdhQG5ldGFwcC5jb20+DQo+IA0KPiBS dW5uaW5nICIuL25mc3Rlc3RfZGVsZWdhdGlvbiAtLXJ1bnRlc3QgcmVjYWxsMjYiIHVuY292ZXJz IHRoYXQNCj4gY2xpZW50IGRvZXNuJ3QgcmVjb3ZlciB0aGUgbG9jayB3aGVuIHdlIGhhdmUgYW4g YXBwZW5kaW5nIG9wZW4sDQo+IHdoZXJlIHRoZSBpbml0aWFsIG9wZW4gZ290IGEgd3JpdGUgZGVs ZWdhdGlvbi4NCj4gDQo+IEluc3RlYWQgb2YgY2hlY2tpbmcgZm9yIHRoZSBwYXNzZWQgaW4gb3Bl biBjb250ZXh0IGFnYWluc3QNCj4gdGhlIGZpbGUgbG9jaydzIG9wZW4gY29udGV4dC4gQ2hlY2sg dGhhdCB0aGUgc3RhdGUgaXMgdGhlIHNhbWUuDQo+IA0KPiBTaWduZWQtb2ZmLWJ5OiBPbGdhIEtv cm5pZXZza2F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