Using UBIFS as an FTL

Artem Bityutskiy artem.bityutskiy at linux.intel.com
Mon Jul 28 09:54:09 PDT 2014


On Fri, 2014-07-25 at 11:21 -0700, Daniel Ehrenberg wrote:
> Hi Artem, others,
> 
> For my project, I'm looking into using ext4 on top of NAND flash, in
> order to use some fancy ext4 features. For this, I need an FTL in the
> middle. I'm wondering which would be good to use. Options that I've
> looked at are:
> - ubiblock--the read-modify-write sounds unacceptable to me, even if
> wear leveling and atomicity are handled.

This may not give you the optimal performance.

> - Some coworkers have suggested a new effort to build a new block
> device, but that that's a huge project and takes a long time to get
> right.

Yes.

> - loopback-mounting a file on ubifs--From skimming the code, it looks
> to me like ubifs uses some nice datastructures to handle writes within
> a file without doing read-modify-writes all the time as ubiblock
> forces. ubifs authors/maintainers, do you see any downside to using
> ubifs this way?

I never tried loopback over UBIFS. Should work in theory.
Synchronization (as in 'fsync()') is something which comes to mind.

What I mean is that when ext4 handles an fsync(), or a commit, it
eventually needs to make sure the data goes to the underlying media. It
sends REQ_FLUSH bios, and it seems that the loopback driver will map
that to UBIFS's 'vfs_fsync()'. That should be fine, but may be too
coarse? You could just write the right pages instead, to gain better
performance?

Then ext4 commit has various ordering requirements, and I do not know
how this works with loopback.

This all matters if you need to have some kind of power-cut tolerance.

Thanks!

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list