linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Matthew L. Creech" <mlcreech@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/2] UBIFS: add the fixup function
Date: Thu, 12 May 2011 13:33:39 +0300	[thread overview]
Message-ID: <1305196419.2713.84.camel@localhost> (raw)
In-Reply-To: <1304722703-7904-2-git-send-email-mlcreech@gmail.com>

On Fri, 2011-05-06 at 18:58 -0400, Matthew L. Creech wrote:
> This patch adds the 'ubifs_fixup_free_space()' function which scans all
> LEBs in the filesystem for those that are in-use but have one or more
> empty pages, then re-maps the LEBs in order to erase the empty portions.
> Afterward it removes the "space_fixup" flag from the UBIFS superblock.
> 
> Signed-off-by: Matthew L. Creech <mlcreech@gmail.com>

...

> +static int fixup_leb_free_space(struct ubifs_info *c, int lnum, int len)

I've renamed it to fixup_leb() which seems to be a nicer name.

> +{
> +       int err;
> +       void *sbuf = c->sbuf;
> +
> +       ubifs_assert(len >= 0);
> +       ubifs_assert(len % c->min_io_size == 0);
> +       ubifs_assert(len < c->leb_size);
> +
> +       if (len == 0) {
> +               dbg_mnt("unmap empty LEB %d", lnum);
> +               return ubi_leb_unmap(c->ubi, lnum);
> +       }
> +
> +       dbg_mnt("fixup LEB %d, data len %d", lnum, len);
> +       err = ubi_read(c->ubi, lnum, sbuf, 0, len);
> +       if (err && err != -EBADMSG)
> +               return err;

I've removed the 'err != -EBADMSG' check because I think we do want to
fail in case of unrecoverable ECC errors.

And I've pushed it to ubifs-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2011-05-12 10:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 22:58 [PATCH 0/2] UBIFS: Free space fixup on first mount Matthew L. Creech
2011-05-06 22:58 ` [PATCH 1/2] UBIFS: add the fixup function Matthew L. Creech
2011-05-12 10:33   ` Artem Bityutskiy [this message]
2011-05-18 20:47     ` [PATCH] UBIFS: don't fail on -EBADMSG when fixing free space Ben Gardiner
2011-05-18 21:41       ` Matthew L. Creech
2011-05-19 13:28         ` Ben Gardiner
2011-05-19 15:59           ` Matthew L. Creech
2011-05-20  6:21           ` Artem Bityutskiy
2011-05-20  6:29           ` Artem Bityutskiy
2011-05-24 14:33             ` Ben Gardiner
2011-05-06 22:58 ` [PATCH 2/2] UBIFS: fix-up free space on mount if flag is set Matthew L. Creech
2011-05-12 10:57   ` Artem Bityutskiy
2011-05-19  5:32     ` [PATCH] UBIFS: document the "free space fixup" flag Matthew L. Creech
2011-05-20  9:24       ` Artem Bityutskiy
2011-05-12 11:09   ` [PATCH 2/2] UBIFS: fix-up free space on mount if flag is set Artem Bityutskiy
2011-05-13  7:58     ` Artem Bityutskiy
2011-05-13 10:59       ` Atlant Schmidt
2011-05-13 12:02         ` Michael Cashwell
2011-05-13 12:29         ` Artem Bityutskiy
2011-05-13 12:34           ` Artem Bityutskiy

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=1305196419.2713.84.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;
as well as URLs for NNTP newsgroup(s).