Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:47964 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756605Ab2FNRVE (ORCPT ); Thu, 14 Jun 2012 13:21:04 -0400 Received: from vmwexceht05-prd.hq.netapp.com (vmwexceht05-prd.hq.netapp.com [10.106.77.35]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id q5EHL41m010519 for ; Thu, 14 Jun 2012 10:21:04 -0700 (PDT) From: "Myklebust, Trond" To: "Adamson, Andy" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH Version 2 1/1] NFSv4.1 Fix umount when filelayout DS is also the MDS Date: Thu, 14 Jun 2012 17:21:03 +0000 Message-ID: <1339694462.2886.35.camel@lade.trondhjem.org> References: <1339690375-2294-1-git-send-email-andros@netapp.com> <1339690375-2294-2-git-send-email-andros@netapp.com> In-Reply-To: <1339690375-2294-2-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: T24gVGh1LCAyMDEyLTA2LTE0IGF0IDEyOjEyIC0wNDAwLCBhbmRyb3NAbmV0YXBwLmNvbSB3cm90 ZToNCg0KPiAtLS0NCj4gIGZzL25mcy9jbGllbnQuYyAgICAgICAgICAgIHwgICA4OCArKysrKysr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKystDQo+ICBmcy9uZnMvaW50ZXJuYWwu aCAgICAgICAgICB8ICAgIDEgKw0KPiAgZnMvbmZzL25mczRmaWxlbGF5b3V0ZGV2LmMgfCAgIDI5 ICsrKysrKysrKysrKy0tDQo+ICBpbmNsdWRlL2xpbnV4L25mc19mc19zYi5oICB8ICAgIDEgKw0K PiAgNCBmaWxlcyBjaGFuZ2VkLCAxMTIgaW5zZXJ0aW9ucygrKSwgNyBkZWxldGlvbnMoLSkNCg0K SGkgQW5keSwNCg0KSXMgdG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