From: Wolfgang Denk <wd@denx.de>
To: Ricard Wanderlof <ricard.wanderlof@axis.com>
Cc: MTD Maling List <linux-mtd@lists.infradead.org>
Subject: Re: Grow UBI device?
Date: Wed, 09 Oct 2013 16:33:18 +0200 [thread overview]
Message-ID: <20131009143318.7BAEB38049B@gemini.denx.de> (raw)
In-Reply-To: <alpine.DEB.2.00.1310091038110.28562@lnxricardw.se.axis.com>
Dear Ricard Wanderlof,
In message <alpine.DEB.2.00.1310091038110.28562@lnxricardw.se.axis.com> you wrote:
>
> > Is there a way to "grow" the existing UBI device so that it now also
> > covers the rest of the NAND chip? Or is my only option to create a
> > second UBI device?
>
> UBI devices are 'attached' to existing mtd partitions. So to grow a UBI
> device, you need to detach it from the partition, re-partition the flash
> (and I'm not sure if this step is even possible as it involves
> unregistering existing mtd partitions), then attach a UBI device to the a
> new partition.
In my situation it is OK if the update involves a reboot, so it is
certainly possible to change the MTD partition layout. So this should
not be a problem.
> Come to think of it, I'm not sure that would work anyway, as the
> resulting, new, enlarged partition would partly contain UBI data and
> partly old jffs2 data. I'm not sure what UBI does when it encounters
> incorrect data, if it just erases the relevant blocks and formats them for
> its own use, or if it barfs completely and just bails out complaining that
> the partition does not contain UBI data. If the relevant blocks were
> erased, then I think UBI would simply concede that the a previous erase
> attempt had been prematurely aborted, and re-erase the blocks and write
> its headers, so perhaps that is something to try. At any rate it involves
> at least some mild trickery (erase the blocks that previously contained
> jffs2 data).
well, this is the exact part where I wanted to know if (1) this is
guaranteed to work (by design), and/or (2) somebody has successfully
done it before.
> It's probably easier to create a new UBI device by attaching it to the
> partition previously used by jffs2, after erasing it, but multiple UBI
> devices across a flash partly defeats the purpose of wear-leveling which
> UBI provides.
Right, and it fragments the device. That's why I'd like to avoid
that.
Thanks!!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Doing the good deeds is like the grass in the garden. You don't see
its growth. But, it does by days. Doing the wicked deeds is like the
hone. You don't see its damage. But, it does by days. - Buddha
next prev parent reply other threads:[~2013-10-09 14:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 19:28 Grow UBI device? Wolfgang Denk
2013-10-09 7:28 ` Matthieu CASTET
2013-10-09 8:46 ` Ricard Wanderlof
2013-10-09 11:28 ` Gupta, Pekon
2013-10-09 15:05 ` Wolfgang Denk
2013-10-09 15:45 ` Ricard Wanderlof
2013-10-09 18:47 ` Richard Weinberger
2013-10-09 20:01 ` Wolfgang Denk
2013-10-10 7:42 ` Artem Bityutskiy
2013-10-09 14:33 ` Wolfgang Denk [this message]
2013-10-10 8:17 ` Artem Bityutskiy
2013-10-10 8:34 ` Richard Weinberger
2013-10-15 17:40 ` Wolfgang Denk
2013-10-15 18:38 ` Richard Weinberger
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=20131009143318.7BAEB38049B@gemini.denx.de \
--to=wd@denx.de \
--cc=linux-mtd@lists.infradead.org \
--cc=ricard.wanderlof@axis.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 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.