Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx12.netapp.com ([216.240.18.77]:56158 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148Ab3IJOC1 (ORCPT ); Tue, 10 Sep 2013 10:02:27 -0400 From: "Myklebust, Trond" To: NeilBrown CC: NFS Subject: Re: [PATCH/RFC] make nfs_flush_incompatible more forgiving. Date: Tue, 10 Sep 2013 14:02:25 +0000 Message-ID: <1378821746.21916.17.camel@leira.trondhjem.org> References: <20130904113632.1a1eb337@notabene.brown> <1378305214.3527.10.camel@leira.trondhjem.org> <20130905092947.248a80e6@notabene.brown> <1378351073.30440.14.camel@leira.trondhjem.org> <20130910144209.21361396@notabene.brown> In-Reply-To: <20130910144209.21361396@notabene.brown> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVHVlLCAyMDEzLTA5LTEwIGF0IDE0OjQyICsxMDAwLCBOZWlsQnJvd24gd3JvdGU6DQo+IE9u IFRodSwgNSBTZXAgMjAxMyAwMzoxNzo1NCArMDAwMCAiTXlrbGVidXN0LCBUcm9uZCINCj4gPFRy b25kLk15a2xlYnVzdEBuZXRhcHAuY29tPiB3cm90ZToNCj4gDQo+ID4gT24gVGh1LCAyMDEzLTA5 LTA1IGF0IDA5OjI5ICsxMDAwLCBOZWlsQnJvd24gd3JvdGU6DQo+ID4gPiBPbiBXZWQsIDQgU2Vw IDIwMTMgMTQ6MzM6MzUgKzAwMDAgIk15a2xlYnVzdCwgVHJvbmQiDQo+ID4gPiA8VHJvbmQuTXlr bGVidXN0QG5ldGFwcC5jb20+IHdyb3RlOg0KPiA+ID4gDQo+ID4gPiA+IE9uIFdlZCwgMjAxMy0w OS0wNCBhdCAxMTozNiArMTAwMCwgTmVpbEJyb3duIHdyb3RlOg0KPiA+ID4gPiA+IEhpLA0KPiA+ ID4gPiA+ICB3ZSBoYXZlIGEgY3VzdG9tZXIgd2hvIGhh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