[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140728082829.GO8628@birch.djwong.org>
Date: Mon, 28 Jul 2014 01:28:29 -0700
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: "Theodore Ts'o" <tytso@....edu>
Cc: Andreas Dilger <adilger@...ger.ca>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 04/18] e2fsck: fix rule-violating lblk->pblk mappings on
bigalloc filesystems
On Sat, Jul 26, 2014 at 04:27:28PM -0400, Theodore Ts'o wrote:
> On Sat, Jul 26, 2014 at 12:02:10AM -0600, Andreas Dilger wrote:
> > Wouldn't it be possible to use this information to determine which
> > of the inodes sharing a duplicate mapped block is the right one
> > and which inode is the bad one?
>
> Yes, although I'm not sure it's worth the effort. Putting in more
> intelligent hueristics for using the metadata checksums will help all
> file systems, and not just bigalloc file systems --- and I think it
> would be easier.
>
> > On Jul 25, 2014, at 18:34, "Darrick J. Wong" <darrick.wong@...cle.com> wrote:
> >
> > As far as I can tell, logical block mappings on a bigalloc filesystem are
> > supposed to follow a few constraints:
> >
> > * The logical cluster offset must match the physical cluster offset.
> > * A logical cluster may not map to multiple physical clusters.
> >
> > Since the multiply-claimed block recovery code can be used to fix these
> > problems, teach e2fsck to find these transgressions and fix them.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
>
> Thanks, applied, but a couple of tips about writing test scripts.
>
> You originally had this:
>
> ../misc/tune2fs -L test_fs $TMPFILE
> ../e2fsck/e2fsck -fy $TMPFILE > $OUT
> ../e2fsck/e2fsck -fy $TMPFILE >> $OUT
> ../e2fsck/e2fsck -fy $TMPFILE >> $OUT
>
> This spits out the version numbers to stderr, which is ugly. I fixed
> up the binary image file to have the test_fs label, and I changed the
> lines above to:
>
> $FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $OUT
> $FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
> $FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
>
> The advantage of doing things this way is that any errors get captured
> in the log file. Also, if the user has requested valgrind be used,
> that gets reflected in the value of $FSCK.
Got it, thanks. I'll do that next time.
--D
>
> Cheers,
>
> - Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists