From: Amir Goldor Subject: Re: Errors reported by Coverity in ext3 Date: Thu, 16 Apr 2009 12:30:27 +0300 Message-ID: <18730dc50904160230ue3cbdccqd223e0a6f2edf06e@mail.gmail.com> References: <18730dc50904120458m1649aaf7tab395436d159105a@mail.gmail.com> <20090413220240.GT17302@webber.adilger.int> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001636c5aa7cea4afc0467a8b652 Cc: linux-ext4@vger.kernel.org To: Andreas Dilger Return-path: Received: from mail-bw0-f169.google.com ([209.85.218.169]:53017 "EHLO mail-bw0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039AbZDPJa3 (ORCPT ); Thu, 16 Apr 2009 05:30:29 -0400 Received: by bwz17 with SMTP id 17so290625bwz.37 for ; Thu, 16 Apr 2009 02:30:27 -0700 (PDT) In-Reply-To: <20090413220240.GT17302@webber.adilger.int> Sender: linux-ext4-owner@vger.kernel.org List-ID: --001636c5aa7cea4afc0467a8b652 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Here it is. Also, the patch that you posted back in 2006 mostly handled jbd error check for "retaking write access" in ext3_clear_blocks(). Do you have a newer patch for that? are you still using that old patch? Thanks, Amir. On Tue, Apr 14, 2009 at 1:02 AM, Andreas Dilger wrote: > > On Apr 12, 2009 =A014:58 +0300, Amir Goldor wrote: > > in reply to your message from 2006 > > (http://marc.info/?l=3Dlinux-ext4&m=3D116310729115980&w=3D2) > > I have prepared a small patch to check jbd errors on 4 occurrences in n= amei.c > > could you please review my patch > > Could you please regenerate your patch with "diff -up" so that the > function names are included into the patch context. > > Cheers, Andreas > -- > Andreas Dilger > Sr. Staff Engineer, Lustre Group > Sun Microsystems of Canada, Inc. > --001636c5aa7cea4afc0467a8b652 Content-Type: application/octet-stream; name="ext3-namei-check-jbd-errors-2.6.28.patch" Content-Disposition: attachment; filename="ext3-namei-check-jbd-errors-2.6.28.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ftl9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