linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: jbacik@redhat.com, linux-ext4@vger.kernel.org
Subject: Re: + ext3-fix-online-resize-bug.patch added to -mm tree
Date: Tue, 03 Jun 2008 14:42:08 -0600	[thread overview]
Message-ID: <20080603204208.GF2961@webber.adilger.int> (raw)
In-Reply-To: <20080602172237.1bfdeb12.akpm@linux-foundation.org>

On Jun 02, 2008  17:22 -0700, Andrew Morton wrote:
> > ------------------------------------------------------
> > Subject: ext3: fix online resize bug
> > From: Josef Bacik <jbacik@redhat.com>
> > 
> > There is a bug when we are trying to verify that the reserve inode's
> > double indirect blocks point back to the primary gdt blocks.  The fix is
> > obvious, we need to mod the gdb count by the addr's per block.  You can
> > verify this with the following test case
> > 
> > dd if=/dev/zero of=disk1 seek=1024 count=1 bs=100M
> > losetup /dev/loop1 disk1
> > pvcreate /dev/loop1
> > vgcreate loopvg1 /dev/loop1
> > lvcreate -l 100%VG loopvg1 -n looplv1
> > mkfs.ext3 -J size=64 -b 1024 /dev/loopvg1/looplv1
> > mount /dev/loopvg1/looplv1 /mnt/loop
> > dd if=/dev/zero of=disk2 seek=1024 count=1 bs=50M
> > losetup /dev/loop2 disk2
> > pvcreate /dev/loop2
> > vgextend loopvg1 /dev/loop2
> > lvextend -l 100%VG /dev/loopvg1/looplv1
> > resize2fs /dev/loopvg1/looplv1
> > 
> > without this patch the resize2fs fails, with it the resize2fs succeeds.
> > 
> 
> Could I please gather some reviews and ackings on this?

You can add a Signed-off-by: Andreas Dilger <adilger@sun.com>
The wrapping is clearly correct, because the end of the res = 0 loop
is itself wrapping "data" after it exceeds "end".  The current code is
just broken if data >= end to start with.

> Also, do we think it is 2.6.25.x material?

It definitely contains no risk unless you are doing an online resize.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


  reply	other threads:[~2008-06-03 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-03  0:17 + ext3-fix-online-resize-bug.patch added to -mm tree akpm
2008-06-03  0:22 ` Andrew Morton
2008-06-03 20:42   ` Andreas Dilger [this message]
2008-06-03 20:54     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080603204208.GF2961@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=jbacik@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).