All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: chengzhihao1 <chengzhihao1@huawei.com>
Cc: Benedikt Spranger <b.spranger@linutronix.de>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 1/1] ubifs: Try to recover from missing znode
Date: Wed, 9 Oct 2024 08:03:52 +0200 (CEST)	[thread overview]
Message-ID: <883601802.30668.1728453832223.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <0840be30-63bc-449d-a9a4-c4e6b54c8885@huawei.com>

----- Ursprüngliche Mail -----
> Von: "chengzhihao1" <chengzhihao1@huawei.com>
> An: "Benedikt Spranger" <b.spranger@linutronix.de>, "linux-kernel" <linux-kernel@vger.kernel.org>
> CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "richard" <richard@nod.at>
> Gesendet: Mittwoch, 9. Oktober 2024 04:23:02
> Betreff: Re: [PATCH 1/1] ubifs: Try to recover from missing znode

> 在 2024/10/8 21:33, Benedikt Spranger 写道:
>> After powercut on a system using ubifs mounting failed:
>> 
>> 2024-09-30T12:38:26.880487+02:00 sonja kernel: UBIFS error (ubi0:0 pid 2178):
>> ubifs_read_node [ubifs]: bad node type (255 but expected 9)
>> 2024-09-30T12:38:26.880506+02:00 sonja kernel: UBIFS error (ubi0:0 pid 2178):
>> ubifs_read_node [ubifs]: bad node at LEB 103:46920, LEB mapping status 0
>> 2024-09-30T12:38:26.880509+02:00 sonja kernel: Not a node, first 24 bytes:
>> 2024-09-30T12:38:26.880510+02:00 sonja kernel: 00000000: ff ff ff ff ff ff ff ff
>> ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> ........................
>> 
>> While traversing over zbranches during the journal replay one zbranch
>> points to a znode, which was not written to the flash and therefore the
>> flash is empty.
> 
> UBIFS guarantees two things for znodes:
> 1) all index nodes(in commit seq N) are written on flash before master
> nodes(for commit seq N) are written.
> 2) all index nodes(in commit seq N) won't be erased from flash before
> master nodes(for commit seq N+1) are written.
> So, I don't understand that why znodes not exist during journal replaying?

In addition to that, is just one znode missing or are larger parts of the flash
empty?

Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: chengzhihao1 <chengzhihao1@huawei.com>
Cc: Benedikt Spranger <b.spranger@linutronix.de>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 1/1] ubifs: Try to recover from missing znode
Date: Wed, 9 Oct 2024 08:03:52 +0200 (CEST)	[thread overview]
Message-ID: <883601802.30668.1728453832223.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <0840be30-63bc-449d-a9a4-c4e6b54c8885@huawei.com>

----- Ursprüngliche Mail -----
> Von: "chengzhihao1" <chengzhihao1@huawei.com>
> An: "Benedikt Spranger" <b.spranger@linutronix.de>, "linux-kernel" <linux-kernel@vger.kernel.org>
> CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "richard" <richard@nod.at>
> Gesendet: Mittwoch, 9. Oktober 2024 04:23:02
> Betreff: Re: [PATCH 1/1] ubifs: Try to recover from missing znode

> 在 2024/10/8 21:33, Benedikt Spranger 写道:
>> After powercut on a system using ubifs mounting failed:
>> 
>> 2024-09-30T12:38:26.880487+02:00 sonja kernel: UBIFS error (ubi0:0 pid 2178):
>> ubifs_read_node [ubifs]: bad node type (255 but expected 9)
>> 2024-09-30T12:38:26.880506+02:00 sonja kernel: UBIFS error (ubi0:0 pid 2178):
>> ubifs_read_node [ubifs]: bad node at LEB 103:46920, LEB mapping status 0
>> 2024-09-30T12:38:26.880509+02:00 sonja kernel: Not a node, first 24 bytes:
>> 2024-09-30T12:38:26.880510+02:00 sonja kernel: 00000000: ff ff ff ff ff ff ff ff
>> ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> ........................
>> 
>> While traversing over zbranches during the journal replay one zbranch
>> points to a znode, which was not written to the flash and therefore the
>> flash is empty.
> 
> UBIFS guarantees two things for znodes:
> 1) all index nodes(in commit seq N) are written on flash before master
> nodes(for commit seq N) are written.
> 2) all index nodes(in commit seq N) won't be erased from flash before
> master nodes(for commit seq N+1) are written.
> So, I don't understand that why znodes not exist during journal replaying?

In addition to that, is just one znode missing or are larger parts of the flash
empty?

Thanks,
//richard

  reply	other threads:[~2024-10-09  6:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 13:33 [PATCH 1/1] ubifs: Try to recover from missing znode Benedikt Spranger
2024-10-08 13:33 ` Benedikt Spranger
2024-10-09  2:23 ` Zhihao Cheng
2024-10-09  2:23   ` Zhihao Cheng
2024-10-09  6:03   ` Richard Weinberger [this message]
2024-10-09  6:03     ` Richard Weinberger
2024-10-09 10:46     ` Zhihao Cheng
2024-10-09 10:46       ` Zhihao Cheng
2024-10-09 12:49       ` Benedikt Spranger
2024-10-09 12:49         ` Benedikt Spranger
2024-10-10  2:30         ` Zhihao Cheng
2024-10-10  2:30           ` Zhihao Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=883601802.30668.1728453832223.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=b.spranger@linutronix.de \
    --cc=chengzhihao1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.