[RFC/PATCH 0/1] ubi: Add ubiblock driver

Artem Bityutskiy dedekind1 at gmail.com
Fri Nov 30 06:24:07 EST 2012


On Sun, 2012-11-25 at 09:36 +0200, Shmulik Ladkani wrote:
> Hi Ezequiel,
> 
> On Sat, 24 Nov 2012 18:02:59 -0300 Ezequiel Garcia <elezegarcia at gmail.com> wrote:
> > I've started working on a workload scenario to measure if ubiblock write
> > is useful or just plain nonsense.
> 
> Please note eraseblock wear is just one aspect of using a standard r/w
> filesystem over ubiblock.
> 
> There's another potential hazard of using r/w ubiblock, which is the
> lack of power-cut tolerance.
> Changing a file atomically in ubifs or jffs2 is tolerant to power
> cuts (see [1]).
> I'm not sure this is possible in ubiblock case, due to the 1-LEB
> writeback cache: if a file (in the mounted fs) is synced, are there any
> guarantees the 1-LEB cache is flushed synchronously?
> (you mentioned the actual write is only done when a request arrives to
> read or write to a different LEB or when the device is released).

Why would not it be? ubiblk is just like a hard drive or and SSD fro a
file-system. If it caches something, it is just like an internal disk
cache. The I/O barrier should flush it. And we have an atomic LEB change
operation, so when you want to change the LEB contents, you can do it in
power-cut-safe manner.

Do I miss something?

> 
> > Since read-only ubiblock is less controversial, I'll post a read-only
> > version of ubiblock (with an option to use a vmalloced
> > buffer to cache reads?).
> > We can add write support later, if it's not useless.
> > 
> > Any thoughts?
> 
> Well I was about to suggest that approach :)
> I would even split your patch further: the core stuff (with r/o
> support), and an additional patch with all the DEBUG stuff. This may
> ease reviewer's job.

I do not see why R/W ubiblock is controversial. You can use FAT on top
of this, which is a use-case many people wanted. Or even ext4.

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20121130/c3088891/attachment.sig>


More information about the linux-mtd mailing list