Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx11.netapp.com ([216.240.18.76]:53445 "EHLO mx11.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756783Ab3ICQOm (ORCPT ); Tue, 3 Sep 2013 12:14:42 -0400 From: "Myklebust, Trond" To: "Adamson, Andy" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH Version 5 4/5] NFS avoid expired credential keys for buffered writes Date: Tue, 3 Sep 2013 16:14:41 +0000 Message-ID: <1378224879.6410.8.camel@leira.trondhjem.org> References: <1376495957-7482-1-git-send-email-andros@netapp.com> <1376495957-7482-5-git-send-email-andros@netapp.com> In-Reply-To: <1376495957-7482-5-git-send-email-andros@netapp.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gV2VkLCAyMDEzLTA4LTE0IGF0IDExOjU5IC0wNDAwLCBhbmRyb3NAbmV0YXBwLmNvbSB3cm90 ZToNCj4gRnJvbTogQW5keSBBZGFtc29uIDxhbmRyb3NAbmV0YXBwLmNvbT4NCj4gDQo+IFdlIG11 c3QgYXZvaWQgYnVmZmVyaW5nIGEgV1JJVEUgdGhhdCBpcyB1c2luZyBhIGNyZWRlbnRpYWwga2V5 IChlLmcuIGEgR1NTDQo+IGNvbnRleHQga2V5KSB0aGF0IGlzIGFib3V0IHRvIGV4cGlyZSBvciBo YXMgZXhwaXJlZC4gIFdlIGN1cnJlbnRseSB3aWxsDQo+IHBhaW50IG91cnNlbHZlcyBpbnRvIGEg Y29ybmVyIGJ5IHJldHVybmluZyBzdWNjZXNzIHRvIHRoZSBhcHBsY2lhdGlvbg0KPiBmb3Igc3Vj aCBhIGJ1ZmZlcmVkIFdSSVRFLCBvbmx5IHRvIGRpc2NvdmVyIHRoYXQgd2UgZG8gbm90IGhhdmUg cGVybWlzc2lvbiB3aGVuDQo+IHdlIGF0dGVtcHQgdG8gZmx1c2ggdGhlIFdSSVRFIChhbmQgcG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