From: Dave Young Subject: Re: [Ext4 punch hole 4/5] Ext4 Punch Hole Support: Enable Punch Hole Date: Tue, 1 Mar 2011 17:56:09 +0800 Message-ID: References: <4D6C634C.8050308@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Cc: linux-ext4@vger.kernel.org To: Allison Henderson Return-path: Received: from mail-vw0-f46.google.com ([209.85.212.46]:40606 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754461Ab1CAJ4L (ORCPT ); Tue, 1 Mar 2011 04:56:11 -0500 Received: by vws12 with SMTP id 12so3966531vws.19 for ; Tue, 01 Mar 2011 01:56:10 -0800 (PST) In-Reply-To: <4D6C634C.8050308@linux.vnet.ibm.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: T24gVHVlLCBNYXIgMSwgMjAxMSBhdCAxMTowOSBBTSwgQWxsaXNvbiBIZW5kZXJzb24KPGFjaGVu ZGVyQGxpbnV4LnZuZXQuaWJtLmNvbT4gd3JvdGU6Cj4gVGhpcyBwYXRjaCBhZGRzIHRoZSDCoG5l dyAiZXh0NF9wdW5jaF9ob2xlIiAiZXh0NF9leHRfcHVuY2hfaG9sZSIgcm91dGluZXMuCj4KPiBm YWxsb2NhdGUgaGFzIGJlZW4gbW9kaWZpZWQgdG8gY2FsbCBleHQ0X3B1bmNoX2hvbGUgd2hlbiB0 aGUgcHVuY2ggaG9sZQo+IGZsYWcgaXMgcGFzc2VkLiDCoEF0IHRoZSBtb21lbnQsIHdlIG9ubHkg c3VwcG9ydCBwdW5jaGluZyBob2xlcyBpbgo+IGV4dGVudHMsIHNvIHRoaXMgcm91dGluZSBpcyBw cmV0dHkgbXVjaCBhIHdyYXBwZXIgZm9yIHRoZSBleHQ0X2V4dF9wdW5jaF9ob2xlCj4gcm91dGlu ZS4KPgo+IFRoZSBleHQ0X2V4dF9wdW5jaF9ob2xlIHJvdXRpbmUgemVyb3Mgb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