Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:25485 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551Ab2DSOgH (ORCPT ); Thu, 19 Apr 2012 10:36:07 -0400 From: "Myklebust, Trond" To: David Howells CC: "linux-fsdevel@vger.kernel.org" , "linux-nfs@vger.kernel.org" , "linux-cifs@vger.kernel.org" , "samba-technical@lists.samba.org" , "linux-ext4@vger.kernel.org" , "wine-devel@winehq.org" , "kfm-devel@kde.org" , "nautilus-list@gnome.org" , "linux-api@vger.kernel.org" , "libc-alpha@sourceware.org" Subject: Re: [PATCH 4/6] xstat: NFS: Return extended attributes Date: Thu, 19 Apr 2012 14:35:50 +0000 Message-ID: <1334846149.21419.22.camel@lade.trondhjem.org> References: <20120419140558.17272.74360.stgit@warthog.procyon.org.uk> <20120419140653.17272.95035.stgit@warthog.procyon.org.uk> In-Reply-To: <20120419140653.17272.95035.stgit@warthog.procyon.org.uk> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVGh1LCAyMDEyLTA0LTE5IGF0IDE1OjA2ICswMTAwLCBEYXZpZCBIb3dlbGxzIHdyb3RlOg0K PiBSZXR1cm4gZXh0ZW5kZWQgYXR0cmlidXRlcyBmcm9tIHRoZSBORlMgZmlsZXN5c3RlbS4gIFRo aXMgaW5jbHVkZXMgdGhlDQo+IGZvbGxvd2luZzoNCj4gDQo+ICAoMSkgVGhlIGNoYW5nZSBhdHRy aWJ1dGUgYXMgc3RfZGF0YV92ZXJzaW9uIGlmIE5GU3Y0Lg0KPiANCj4gICgyKSBYU1RBVF9JTkZP X0FVVE9NT1VOVCBhbmQgWFNUQVRfSU5GT19GQUJSSUNBVEVEIGFyZSBzZXQgb24gcmVmZXJyYWwg b3INCj4gICAgICBzdWJtb3VudCBkaXJlY3RvcmllcyB0aGF0IGFyZSBhdXRvbW91bnRlZCB1cG9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