UBIFS - read only file system

Richard Weinberger richard.weinberger at gmail.com
Fri Jan 15 12:14:35 PST 2016


Hi!

On Fri, Jan 15, 2016 at 6:24 PM, Tiago Trota <tiagofgdt at gmail.com> wrote:
> I have a system with ARM which is using a NAND flash to store kernel
> and file system.
> After a reboot  I get these errors and the UBIFS file system becomes
> read-only. I can't revert this situation and it was the first time
> this happened. Is there anyhing I can do to repair it?

The more interesting question is, why could this happen?
Did you see some other errors before that?
Is this a recent kernel?

> UBIFS error (pid 454): ubifs_iget: failed to read inode 41930, error -2
> UBIFS error (pid 454): ubifs_lookup: dead directory entry 'snmpd.pid', error -2
> UBIFS warning (pid 454): ubifs_ro_mode: switched to read-only mode, error -2

This is:
        inode = ubifs_iget(dir->i_sb, le64_to_cpu(dent->inum));
        if (IS_ERR(inode)) {
                /*
                 * This should not happen. Probably the file-system needs
                 * checking.
                 */
                err = PTR_ERR(inode);
                ubifs_err(c, "dead directory entry '%pd', error %d",
                          dentry, err);
                ubifs_ro_mode(c, err);
                goto out;
        }

Can you share the filesystem?

-- 
Thanks,
//richard



More information about the linux-mtd mailing list