[Ocfs2-tools-devel] [PATCH 17/20] fsck.ocfs2: Make pass0 aware of discontig block group.

Joel Becker Joel.Becker at oracle.com
Sun Jul 18 02:06:20 PDT 2010


On Sun, Jul 18, 2010 at 04:38:00PM +0800, Tao Ma wrote:
> On 07/18/2010 03:45 AM, Joel Becker wrote:
> >	How would one figure l_next_free_rec?  Well, if you walk the
> >extents and discover that N extents add up to exactly cpg, doesn't that
> >have to be the l_next_free_rec?  If you run into a zero extent before
> >counting cpg, the whole group has to be removed, of course.
> So we will trust the extent record in the list and change
> l_next_free_rec accordingly? maybe it works, let us wait and see the
> result. ;)

	We only trust it as far as it looks good.  Sort of:

    if (l_next_free_rec looks bad) {
        try_counting_extents() {
            if (an extent looks even remotely weird)
                drop this gd
        }
    } else {
        validate extents against l_next_free_rec
        if (an extent is fixable)
            fixit
        else if (an extent is insane)
            drop this gd
    }

	Basically, if l_next_free_rec is good, we can try to fix
extents.  If it is bad, we can try to fix it, but only if the extents
are good.  If there's a problem with both, we throw up our hands.

Joel
  
-- 

Life's Little Instruction Book #396

	"Never give anyone a fruitcake."

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list