From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Matthew L. Creech" <mlcreech@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] UBIFS: optionally return partial LEB scan results
Date: Wed, 08 Jun 2011 17:16:09 +0300 [thread overview]
Message-ID: <1307542569.31223.101.camel@localhost> (raw)
In-Reply-To: <1307479967-3909-1-git-send-email-mlcreech@gmail.com>
On Tue, 2011-06-07 at 16:52 -0400, Matthew L. Creech wrote:
> ubifs_scan() currently returns -EUCLEAN when it encounters corrupted data
> while scanning a LEB. This is usually the right thing to do, but it prevents
> us from debugging certain kinds of corruption, since ubifs_scan() is called
> from dbg_dump_leb().
>
> Add a flag which makes ubifs_scan() return partial node data when corruption
> is encountered, and use that flag in dbg_dump_leb().
>
> Signed-off-by: Matthew L. Creech <mlcreech@gmail.com>
> ---
> fs/ubifs/debug.c | 2 +-
> fs/ubifs/gc.c | 2 +-
> fs/ubifs/log.c | 2 +-
> fs/ubifs/lprops.c | 2 +-
> fs/ubifs/master.c | 4 ++--
> fs/ubifs/orphan.c | 4 ++--
> fs/ubifs/recovery.c | 2 +-
> fs/ubifs/replay.c | 4 ++--
> fs/ubifs/scan.c | 16 ++++++++++++----
> fs/ubifs/tnc_commit.c | 2 +-
> fs/ubifs/ubifs.h | 2 +-
> 11 files changed, 25 insertions(+), 17 deletions(-)
Thanks, but I think I'll do it differently. If the ubifs_scan() quiet
parameter is 0, then I can notice that this mean that the caller expects
corruptions and will fix it up. In which case current code will re-scan
the LEB. And I will make it so that if quiet == 0, then the scanned
buffer is not destroyed.
This will first of all make sure we do not read the same LEB 2 times
when recovering. And second of all - this is anyway needed to handle
unstable bits. So I'll be working on this change myself.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
prev parent reply other threads:[~2011-06-08 14:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 20:52 [PATCH] UBIFS: optionally return partial LEB scan results Matthew L. Creech
2011-06-08 14:16 ` Artem Bityutskiy [this message]
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=1307542569.31223.101.camel@localhost \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=mlcreech@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox