[PATCH 2/3] ubifs: add ubifs_mount_fixup_lebs()

Matthew L. Creech mlcreech at gmail.com
Wed May 4 18:02:13 EDT 2011


All makes sense Artem, thanks for the feedback.

On Wed, May 4, 2011 at 7:13 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Tue, 2011-05-03 at 18:55 -0400, Matthew L. Creech wrote:
>> +
>> +             if (!(lprops->flags & LPROPS_EMPTY) &&
>
> I think this is not quite right, because empty taken LEBs will not be
> fixed up. I think you should only look at free space and nothing else.
>

OK, however I did find that I needed to check for (lprops->flags &
LPROPS_TAKEN) in addition to (lprops->free == c->leb_size) before
unmapping a LEB.  Failing to do so caused this:

UBIFS error (pid 1): check_lpt_type: invalid type (15) in LPT node type 1
UBIFS error (pid 1): ubifs_read_nnode: error -22 reading nnode at 8:783

so apparently it was unmapping part of the LPT, I guess?

-- 
Matthew L. Creech



More information about the linux-mtd mailing list