UBIFS becomes read-only when written, then fails to mount

Matt Hevern matt.hevern at gmail.com
Wed Jul 2 22:16:33 PDT 2014


On Tue, Jul 01, 2014 at 04:55:52PM +0300, Artem Bityutskiy wrote:
> On Wed, 2014-06-18 at 14:44 +1000, Matt Hevern wrote:
> > Hi All,
> > 
> > 
> > I am running UBIFS on freescale i.MX28, kernel 2.6.35.3, based on
> > freescale's IMX tree:
> > http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/?h=imx_2.6.35_maintain
> > The flash is NAND, Micron 256MiB (MT29F2G08)
> 
> In your dumps I see that there are errors related to UBIFS not being
> able to find an LEB for the garbage collector. And I remember we fixed
> bugs in this area.
> 
> For example, "6fb4374 UBIFS: fix GC LEB recovery", and there were more.
> Search for 'ubifs_rcvry_gc_commit' in 'git log -p fs/ubifs/recovery.c'.

I merged in the patch you mentioned, along with 350 others which
were on git://github.com/computersforpeace/UBIFS-backports.git on the
'ubifs-v2.6.35' branch (all the patches above Linux 2.6.35.3)
When I attempted to mount the same filesystem, I got a similar error to
last time.
Is it likely this UBIFS filesystem which was manipulated with the previous driver without
all these patches is now corrupt and will require reformatting ?

I'd just like to verify my understanding that that the patches applied are not
going to be able to fix or repair the now corrupt filesystem, but are likely to
prevent the same issue for occuring again ?


Thanks,

Matt


------Current dmesg error, after mount attempt

UBIFS DBG (pid 1141): ubifs_bg_thread: background thread "ubifs_bgt0_5" started, PID 1141
UBIFS error (pid 1139): validate_master: bad master node at offset 20480 error 7
        magic          0x6101831
        crc            0x3bc3dd3d
        node_type      7 (master node)
        group_type     0 (no node group)
        sqnum          156822
        len            512
        highest_inum   376
        commit number  132
        flags          0x2
        log_lnum       3
        root_lnum      152
        root_offs      24648
        root_len       88
        gc_lnum        4294967295
        ihead_lnum     152
        ihead_offs     26624
        index_size     109968
        lpt_lnum       7
        lpt_offs       16857
        nhead_lnum     7
        nhead_offs     18432
        ltab_lnum      7
        ltab_offs      16384
        lsave_lnum     0
        lsave_offs     0
        lscan_lnum     12
        leb_cnt        173
        empty_lebs     0
        idx_lebs       5
        total_free     102400
        total_dirty    4656000
        total_used     15828720
        total_dead     0
        total_dark     837352
UBIFS DBG (pid 1141): ubifs_bg_thread: background thread "ubifs_bgt0_5" stops



More information about the linux-mtd mailing list