Return-Path: From: Trond Myklebust To: "bcodding@redhat.com" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH 2/3] NFS: Be more targeted about readdirplus use when doing lookup/revalidation Date: Thu, 1 Dec 2016 20:47:40 +0000 Message-ID: <1480625258.10526.1.camel@primarydata.com> References: <1479574497-38268-1-git-send-email-trond.myklebust@primarydata.com> <1479574497-38268-2-git-send-email-trond.myklebust@primarydata.com> <1479574497-38268-3-git-send-email-trond.myklebust@primarydata.com> <28E39796-E929-4D65-A6F6-D0AF803AB390@redhat.com> In-Reply-To: <28E39796-E929-4D65-A6F6-D0AF803AB390@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 List-ID: T24gV2VkLCAyMDE2LTExLTMwIGF0IDE0OjA5IC0wNTAwLCBCZW5qYW1pbiBDb2RkaW5ndG9uIHdy b3RlOg0KPiAuLiB0aGlzIG9uZSBicmVha3MgdGhpbmdzIGFnYWluOg0KPiANCj4gT24gMTkgTm92 IDIwMTYsIGF0IDExOjU0LCBUcm9uZCBNeWtsZWJ1c3Qgd3JvdGU6DQo+IA0KPiA+IFRoZXJlIGlz IGxpdHRsZSBwb2ludCBpbiBzZXR0aW5nIE5GU19JTk9fQURWSVNFX1JEUExVUyBpbg0KPiA+IG5m c19sb29rdXDCoA0KPiA+IGFuZA0KPiA+IG5mc19sb29rdXBfcmV2YWxpZGF0ZSgpIHVubGVzcyBh IHByb2Nlc3MgaXMgYWN0dWFsbHkgZG9pbmcgcmVhZGRpcg0KPiA+IG9uwqANCj4gPiB0aGUNCj4g PiBwYXJlbnQgZGlyZWN0b3J5Lg0KPiA+IEZ1cnRoZXJtb3JlLCB0aGVyZSBpcyBsaXR0bGUgcG9p bnQgaW4gdXNpbmcgcmVhZGRpcnBsdXMgaWYgd2UncmXCoA0KPiA+IHRyeWluZw0KPiA+IHRvIHJl dmFsaWRhdGUgYSBuZWdhdGl2ZSBkZW50cnkuDQo+ID4gDQo+ID4gU2lnbmVkLW9mZi1ieTogVH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