From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Willy Tarreau <w@1wt.eu>, Artem Bityutskiy <dedekind1@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Mike Frysinger <vapier@gentoo.org>,
Michael Opdenacker <michael.opdenacker@free-electrons.com>,
linux-mtd@lists.infradead.org, Tim Bird <tim.bird@am.sony.com>,
Piergiorgio Beruto <piergiorgio.beruto@gmail.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 1/1] ubi: Introduce block devices for UBI volumes
Date: Sat, 8 Feb 2014 13:50:42 -0300 [thread overview]
Message-ID: <20140208165041.GA4494@localhost> (raw)
In-Reply-To: <20140204110643.GA2414@localhost>
On Tue, Feb 04, 2014 at 08:06:43AM -0300, Ezequiel Garcia wrote:
> On Fri, Jan 31, 2014 at 06:06:37PM +0100, Willy Tarreau wrote:
> > On Wed, Jan 29, 2014 at 05:38:01PM -0300, Ezequiel Garcia wrote:
> > > Block device emulation on top of ubi volumes with cached read/write support.
> > > Both the cached access and the write support are selectable at compile time.
> > >
> > > Given UBI takes care of wear leveling and bad block management it's possible
> > > to add a thin layer to enable block device access to UBI volumes.
> > > This allows to use a block-oriented filesystem on a flash device.
> > >
> > > In a similar fashion to mtdblock, a 1-LEB size cache has been
> > > implemented. However, very memory-constrained systems can choose to
> > > disable the cache and save the 1-LEB byte allocation.
> > >
> > > If write support is enabled, the flash device will be written when the cache
> > > is flushed. The following events trigger this:
> > > * block device release (detach)
> > > * different than cached leb is accessed
> > > * io-barrier is received through a REQ_FLUSH request
> > >
> > > Despite this efforts, it's very important to remember that regular
> > > block-oriented filesystems have no care at all about wear leveling;
> > > they will access the block device randomly, only caring for performance.
> > > Therefore, write support should be selected only for development and
> > > with extreme caution.
> > >
> > > The cache is 1-LEB bytes, vmalloced at open() and freed at release();
> > > in addition, each block device has a workqueue associated.
> > >
> > > Block devices are created upon user request through new ioctls:
> > > UBI_IOCVOLATTBLK to attach and UBI_IOCVOLDETBLK to detach.
> > > Also, a new UBI module parameter is added 'ubi.block'. This parameter is
> > > needed in order to attach a block device on boot-up time, allowing to
> > > mount the rootfs on a ubiblock device.
> > > For instance, you could have these kernel parameters:
> > >
> > > ubi.mtd=5 ubi.block=0,0 root=/dev/ubiblock0_0
> > >
> > > Or, if you compile ubi as a module:
> > >
> > > $ modprobe ubi mtd=/dev/mtd5 block=/dev/ubi0_0
> > >
> > > Cc: Artem Bityutskiy <dedekind1@gmail.com>
> > > Cc: David Woodhouse <dwmw2@infradead.org>
> > > Cc: Brian Norris <computersforpeace@gmail.com>
> > > Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
> > > Cc: Tim Bird <tim.bird@am.sony.com>
> > > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > > Cc: Mike Frysinger <vapier@gentoo.org>
> > > Cc: Piergiorgio Beruto <piergiorgio.beruto@gmail.com>
> > > Cc: Willy Tarreau <w@1wt.eu>
> > > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> >
> > Works pretty well here on 3.14-git. I've also tested write support
> > with success. I'm booting from a squashfs installed on top of it.
> > I find that the combination of squashfs + ubiblock is really good
> > for a rootfs. It's fast, space-efficient in terms of RAM and NAND,
> > and made reliable by the ubi layer.
> >
> > Concerning the question about the usage of write support, I find it
> > useful to perform rootfs upgrades from Linux.
> >
> > Feel free to add :
> >
> > Tested-By: Willy Tarreau <w@1wt.eu>
> >
>
> Thanks Willy!
>
> Artem: If at all possible, I'd like to avoid stalling, so feel free to comment
> on anything...
Ping?
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-02-08 16:51 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 20:38 [PATCH 0/1] ubi: Introduce block devices for UBI volumes Ezequiel Garcia
2014-01-29 20:38 ` [PATCH 1/1] " Ezequiel Garcia
2014-01-31 17:06 ` Willy Tarreau
2014-02-04 11:06 ` Ezequiel Garcia
2014-02-08 16:50 ` Ezequiel Garcia [this message]
2014-02-08 21:37 ` Richard Weinberger
2014-02-08 22:51 ` Willy Tarreau
2014-02-08 22:56 ` Richard Weinberger
2014-02-08 23:01 ` Willy Tarreau
2014-02-08 23:10 ` Piergiorgio Beruto
2014-02-08 23:13 ` Richard Weinberger
2014-02-08 23:15 ` Willy Tarreau
2014-02-08 23:25 ` Richard Weinberger
2014-02-08 23:37 ` Willy Tarreau
2014-02-09 0:17 ` Richard Weinberger
2014-02-09 7:51 ` Willy Tarreau
2014-02-10 2:48 ` Ezequiel Garcia
2014-02-10 7:35 ` Artem Bityutskiy
2014-02-10 8:27 ` Ezequiel Garcia
2014-02-10 8:46 ` Willy Tarreau
2014-02-10 14:20 ` Ezequiel Garcia
2014-02-10 14:41 ` Richard Weinberger
2014-02-10 14:50 ` Artem Bityutskiy
2014-02-10 14:52 ` Bityutskiy, Artem
2014-02-10 16:15 ` Willy Tarreau
2014-02-10 14:53 ` Bityutskiy, Artem
2014-02-10 18:48 ` Ezequiel Garcia
[not found] ` <a86d653a-9e3b-46dc-9ec8-94a9c1099bec@email.android.com>
2014-02-10 21:43 ` Willy Tarreau
2014-02-11 8:37 ` Geert Uytterhoeven
2014-02-11 9:05 ` Willy Tarreau
2014-02-11 9:35 ` Ezequiel Garcia
2014-02-11 9:43 ` Peter Korsgaard
2014-02-11 10:21 ` Geert Uytterhoeven
2014-02-10 22:37 ` Thomas Petazzoni
[not found] ` <de976336-3144-4f21-859b-d1a37fc3d811@email.android.com>
2014-02-10 22:46 ` Thomas Petazzoni
[not found] ` <a3fc06a8-c809-4687-9da4-015bd8dd29e8@email.android.com>
2014-02-10 23:01 ` Thomas Petazzoni
2014-02-10 23:19 ` Ezequiel Garcia
2014-02-10 8:50 ` Artem Bityutskiy
2014-02-08 23:05 ` Piergiorgio Beruto
2014-02-08 23:13 ` Willy Tarreau
2014-02-10 8:42 ` Thomas Petazzoni
2014-02-10 8:51 ` Willy Tarreau
2014-02-10 1:29 ` Ezequiel Garcia
2014-02-10 7:53 ` Richard Weinberger
2014-02-10 8:12 ` Ezequiel Garcia
2014-02-10 8:24 ` Artem Bityutskiy
2014-02-10 8:37 ` Willy Tarreau
2014-02-10 8:50 ` Ezequiel Garcia
2014-02-09 22:56 ` Richard Weinberger
2014-02-10 2:36 ` Ezequiel Garcia
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=20140208165041.GA4494@localhost \
--to=ezequiel.garcia@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael.opdenacker@free-electrons.com \
--cc=piergiorgio.beruto@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tim.bird@am.sony.com \
--cc=vapier@gentoo.org \
--cc=w@1wt.eu \
/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).