From: Peng Tao Subject: Re: [PATCH 3/4]ext4: Return exchanged blocks count to user space in failure Date: Fri, 11 Sep 2009 13:28:52 +0800 Message-ID: <6149e97b0909102228i439c35bekec888184aea32e78@mail.gmail.com> References: <4A9DE3EA.1080602@rs.jp.nec.com> <4A9E9521.2010701@gmail.com> <87f94c370909021359p171c6f6dte9b700cd48a5fde0@mail.gmail.com> <6149e97b0909022213p2b8463fdm796c8687d36ae54c@mail.gmail.com> <4AA0E419.7010707@rs.jp.nec.com> <4AA143B2.6060401@gmail.com> <4AA5D984.6030607@rs.jp.nec.com> <4AA60F36.9040605@gmail.com> <4AA9DAF0.2020402@rs.jp.nec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Cc: Greg Freemyer , Theodore Tso , linux-ext4@vger.kernel.org To: Akira Fujita Return-path: Received: from mail-pz0-f184.google.com ([209.85.222.184]:48865 "EHLO mail-pz0-f184.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753569AbZIKF2s (ORCPT ); Fri, 11 Sep 2009 01:28:48 -0400 Received: by mail-pz0-f184.google.com with SMTP id 14so651216pzk.1 for ; Thu, 10 Sep 2009 22:28:52 -0700 (PDT) In-Reply-To: <4AA9DAF0.2020402@rs.jp.nec.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: SGksIEFyaWthLAoKMjAwOS85LzExIEFraXJhIEZ1aml0YSA8YS1mdWppdGFAcnMuanAubmVjLmNv bT46Cj4gSGkgUGVuZywKPiBQZW5nIFRhbyB3cm90ZToKPj4+PiBBZnRlciBhcHBseWluZyB0aGUg dHdvIHBhdGNoZXMsIEkgcnVuIG15IHRlc3QgY2FzZSB3aXRoIGZpcnN0LmltZyBhcyB0aGUgb3Jp ZyBmaWxlIChhbmQgbWlkZGxlLmltZyBvcgo+Pj4+IGxhc3QuaW1nIGFzIGRvbm9yIGZpbGUpLiBN eSBrZXJuZWwgcGFuaWNzIGFuZCBJIGZpbmQgZm9sb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