Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:64839 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752198Ab2HPX4j (ORCPT ); Thu, 16 Aug 2012 19:56:39 -0400 From: "Myklebust, Trond" To: Shai Lazmi CC: William Dauchy , "Schumaker, Bryan" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH 1/2] NFS: Clear key construction data if the idmap upcall fails Date: Thu, 16 Aug 2012 23:56:36 +0000 Message-ID: <4FA345DA4F4AE44899BD2B03EEEC2FA93B54EC@SACEXCMBX04-PRD.hq.netapp.com> References: <1345148622-10845-1-git-send-email-Trond.Myklebust@netapp.com> <21641D3714F5AF449DC483E699E1124E86E640957F@AVEXMB2.qlogic.org> <4FA345DA4F4AE44899BD2B03EEEC2FA93B542B@SACEXCMBX04-PRD.hq.netapp.com> <21641D3714F5AF449DC483E699E1124E86E6409585@AVEXMB2.qlogic.org> In-Reply-To: <21641D3714F5AF449DC483E699E1124E86E6409585@AVEXMB2.qlogic.org> Content-Type: multipart/mixed; boundary="_003_4FA345DA4F4AE44899BD2B03EEEC2FA93B54ECSACEXCMBX04PRDhqn_" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: --_003_4FA345DA4F4AE44899BD2B03EEEC2FA93B54ECSACEXCMBX04PRDhqn_ Content-Type: text/plain; charset="utf-8" Content-ID: <28E762BBEF8BFD47B2E7B63C3EE00ECB@tahoe.netapp.com> Content-Transfer-Encoding: base64 T24gVGh1LCAyMDEyLTA4LTE2IGF0IDE2OjUwIC0wNzAwLCBTaGFpIExhem1pIHdyb3RlOg0KPiBN UyBvdXRsb29rDQoNCkRvbid0IGV2ZXIgdXNlIExvb2tPdXQgZm9yIHBhdGNoZXMuIEl0cyAiSSBq dXN0IHJlZm9ybWF0dGVkIHlvdXIgZW1haWwiDQp3b25kZXIgZmVhdHVyZSBicmVha3MgYWxsIHRo ZSB3aGl0ZXNwYWNlLg0KDQo+IEJlc3QgdGhpbmcgaXMgdG8gYXR0YWNoZWQgdGhlIHBhdGNoDQoN CldlIGRvIG5vdCBub3JtYWxseSB1c2UgYXR0YWNobWVudHMgb24gdGhlIG1haWxpbmcgbGlzdCBi ZWNhdXNlIGl0IG1ha2VzDQppdCBpbXBvc3NpYmxlIHRvIGNvbW1lbnQgdGhlIHBhdGNoZXMgaW5s aW5lLiBBaCB3ZWxsLCBoZXJlIGdvZXMuLi4NCg0KLS0gDQpUcm9uZCBNeWtsZWJ1c3QNCkxpbnV4 IE5GUyBjbGllbnQgbWFpbnRhaW5lcg0KDQpOZXRBcHANClRyb25kLk15a2xlYnVzdEBuZXRhcHAu Y29tDQp3d3cubmV0YXBwLmNvbQ0KDQo= --_003_4FA345DA4F4AE44899BD2B03EEEC2FA93B54ECSACEXCMBX04PRDhqn_ Content-Type: text/x-patch; name="0001-NFS-Clear-key-construction-data-if-the-idmap-upcall-.patch" Content-Description: 0001-NFS-Clear-key-construction-data-if-the-idmap-upcall-.patch Content-Disposition: attachment; filename="0001-NFS-Clear-key-construction-data-if-the-idmap-upcall-.patch"; size=4671; creation-date="Thu, 16 Aug 2012 23:56:36 GMT"; modification-date="Thu, 16 Aug 2012 23:56:36 GMT" Content-ID: <3D502F5C7273FC46B362ABE23F3939FC@tahoe.netapp.com> Content-Transfer-Encoding: base64 RnJvbSA3ZjI2ZDc0NDk4Y2EwMDBjY2ZhMjg1MTViODY5OThmMGEwYzIyOThhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQ0KRnJvbTogQnJ5YW4gU2NodW1ha2VyIDxianNjaHVtYUBuZXRhcHAuY29t Pg0KRGF0ZTogVGh1LCA5IEF1ZyAyMDEyIDE0OjA1OjQ5IC0wNDAwDQpTdWJqZWN0OiBbUEFUQ0gg MS8yXSBORlM6IENsZWFyIGtleSBjb25zdHJ1Y3Rpb24gZGF0YSBpZiB0aGUgaWRtYXAgdXBjYWxs DQogZmFpbHMNCg0KaW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yZWUgbWVtb3J5IGFsbG9jYXRlZCBpbiBuZnNfaWRtYXBfbGVn YWN5X3VwY2FsbCgpICovDQotCWtmcmVlKG1zZy0+ZGF0YSk7DQotCWtmcmVlKG1zZyk7DQorCWtm cmVlKGRhdGEpOw0KK30NCisNCitzdGF0aWMgdm9pZA0KK2lkbWFwX3JlbGVhc2VfcGlwZShzdHJ1 Y3QgaW5vZGUgKmlub2RlKQ0KK3sNCisJc3RydWN0IHJwY19pbm9kZSAqcnBjaSA9IFJQQ19JKGlu b2RlKTsNCisJc3RydWN0IGlkbWFwICppZG1hcCA9IChzdHJ1Y3QgaWRtYXAgKilycGNpLT5wcml2 YXRlOw0KKwlpZG1hcC0+aWRtYXBfa2V5X2NvbnMgPSBOVUxMOw0KIH0NCiANCiBpbnQgbmZzX21h cF9uYW1lX3RvX3VpZChjb25zdCBzdHJ1Y3QgbmZzX3NlcnZlciAqc2VydmVyLCBjb25zdCBjaGFy ICpuYW1lLCBzaXplX3QgbmFtZWxlbiwgX191MzIgKnVpZCkNCi0tIA0KMS43LjExLjINCg0K --_003_4FA345DA4F4AE44899BD2B03EEEC2FA93B54ECSACEXCMBX04PRDhqn_ Content-Type: text/x-patch; name="0002-NFS-return-ENOKEY-when-the-upcall-fails-to-map-the-n.patch" Content-Description: 0002-NFS-return-ENOKEY-when-the-upcall-fails-to-map-the-n.patch Content-Disposition: attachment; filename="0002-NFS-return-ENOKEY-when-the-upcall-fails-to-map-the-n.patch"; size=1316; creation-date="Thu, 16 Aug 2012 23:56:36 GMT"; modification-date="Thu, 16 Aug 2012 23:56:36 GMT" Content-ID: Content-Transfer-Encoding: base64 RnJvbSBkMGY2ZWNhN2ViMTc1MzczYTYxMTczZDg2ZjNjZjRlYzRhOTE2NmZhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQ0KRnJvbTogQnJ5YW4gU2NodW1ha2VyIDxianNjaHVtYUBuZXRhcHAuY29t Pg0KRGF0ZTogVGh1LCA5IEF1ZyAyMDEy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