linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] UBIFS - new flash file system
@ 2008-03-27 14:55 Artem Bityutskiy
  2008-03-27 14:55 ` [RFC PATCH 01/26] VFS: introduce writeback_inodes_sb() Artem Bityutskiy
                   ` (30 more replies)
  0 siblings, 31 replies; 89+ messages in thread
From: Artem Bityutskiy @ 2008-03-27 14:55 UTC (permalink / raw)
  To: LKML; +Cc: Adrian Hunter, Artem Bityutskiy

Dear community,

here is a new flash file system developed by Nokia engineers with
help of the University of Szeged. The new file-system is called
UBIFS, which stands for UBI file system. UBI is the wear-leveling/
bad-block handling/volume management layer which is already in
mainline (see drivers/mtd/ubi).

The main objective of UBIFS is better performance and scalability
comparing to JFFS2 which is achieved by
 a) implementing write-back (JFFS2 is write-through)
 b) storing and maintaining the indexing file-system information
    on the media (JFFS2 maintains it in RAM and builds it on each
    mount, which requires full media scanning).

At the same time, UBIFS implements the nice features JFFS2 has -
compression and tolerance to unclean re-boots. Although UBIFS
borrowed basic ideas from JFFS2, it is completely different
file-system.

UBIFS is stable and very close to be production ready. It was
tested on OLPC and N810. The development was done on flash simulator
on a 2-way x86 machine. However, UBIFS needs a good review.

Note, UBIFS works on top of UBI, not on top of bare flash devices.
It delegates crucial things like garbage-collection and bad
eraseblock handling to UBI. One important thing to note is MLC
NAND flashes which tend to have very small eraseblock lifetime -
just few thousand erase-cycles (some have even about 3000 or less).
This makes JFFS2 random wear-leveling algorithm to be not good
enough. In opposite, UBI provides good wear-leveling based on
saved erase-counters.

There is also mkfs.ubifs user-space utility, so it is possible to
prepare UBIFS images. Please, see the URLs given at the end of this
letter.

UBIFS performs quite well - it gives very good write performance
because of write-back (write tests gave us ~100 times faster
performance which is clearly because of the caching) while giving
about the same performance as JFFS2 gives on synchronous operations.
Obviously, it is extremely difficult to compete with JFFS2 on
synchronous operations because it maintains the FS index in RAM,
while UBIFS maintains it on the flash media. However, because of
many tricks and optimization implemented in UBIFS (wandering
and multi-headed journal, write-while-committing, search trees,
etc), it has very good synchronous I/O performance.

UBIFS mount time is considerably faster as well. For example,
In case of OLPC we observed 10-15 seconds faster boot time
comparing to JFFS2 (fast mount, no full media check).

UBIFS is quite complex because it is difficult to maintain
indexing information on the flash media and be fast at the same
time. Please, refer the UBIFS white paper for information
about UBIFS design.

UBIFS documentation and FAQ sections:
http://www.linux-mtd.infradead.org/doc/ubifs.html
http://www.linux-mtd.infradead.org/faq/ubifs.html

UBIFS white-paper:
http://www.linux-mtd.infradead.org/doc/ubifs_whitepaper.pdf

Since UBIFS is closely related to UBI, the UBI documentation/FAQ
is also useful:
http://www.linux-mtd.infradead.org/doc/ubi.html
http://www.linux-mtd.infradead.org/faq/ubi.html

Adrian Hunter
Artem Bityutskiy

The overall diffstat:
 fs/Kconfig                |    3 +
 fs/Makefile               |    1 +
 fs/fs-writeback.c         |    8 +
 fs/ubifs/Kconfig          |   47 +
 fs/ubifs/Kconfig.debug    |  159 ++
 fs/ubifs/Makefile         |    9 +
 fs/ubifs/budget.c         |  822 +++++++++++
 fs/ubifs/build.c          | 1351 ++++++++++++++++++
 fs/ubifs/commit.c         |  708 +++++++++
 fs/ubifs/compress.c       |  264 ++++
 fs/ubifs/debug.c          | 1125 +++++++++++++++
 fs/ubifs/debug.h          |  343 +++++
 fs/ubifs/dir.c            |  989 +++++++++++++
 fs/ubifs/file.c           |  790 ++++++++++
 fs/ubifs/find.c           |  951 +++++++++++++
 fs/ubifs/gc.c             |  773 ++++++++++
 fs/ubifs/io.c             |  921 ++++++++++++
 fs/ubifs/ioctl.c          |  205 +++
 fs/ubifs/journal.c        | 1230 ++++++++++++++++
 fs/ubifs/key.h            |  507 +++++++
 fs/ubifs/log.c            |  769 ++++++++++
 fs/ubifs/lprops.c         | 1341 +++++++++++++++++
 fs/ubifs/lpt.c            | 2239 +++++++++++++++++++++++++++++
 fs/ubifs/lpt_commit.c     | 1628 +++++++++++++++++++++
 fs/ubifs/master.c         |  415 ++++++
 fs/ubifs/misc.h           |  267 ++++
 fs/ubifs/orphan.c         |  952 +++++++++++++
 fs/ubifs/recovery.c       | 1437 +++++++++++++++++++
 fs/ubifs/replay.c         | 1006 +++++++++++++
 fs/ubifs/sb.c             |  581 ++++++++
 fs/ubifs/scan.c           |  368 +++++
 fs/ubifs/shrinker.c       |  410 ++++++
 fs/ubifs/super.c          |  531 +++++++
 fs/ubifs/tnc.c            | 3483 +++++++++++++++++++++++++++++++++++++++++++++
 fs/ubifs/tnc_commit.c     | 1088 ++++++++++++++
 fs/ubifs/ubifs-media.h    |  701 +++++++++
 fs/ubifs/ubifs.h          | 1519 ++++++++++++++++++++
 fs/ubifs/xattr.c          |  587 ++++++++
 include/linux/writeback.h |    1 +
 39 files changed, 30529 insertions(+), 0 deletions(-)

Note, the code is quite large because of complexity and because
of great deal of comments it has. The debugging stuff also
introduces quite a few lines of code.

^ permalink raw reply	[flat|nested] 89+ messages in thread

end of thread, other threads:[~2008-04-30  7:09 UTC | newest]

Thread overview: 89+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27 14:55 [RFC PATCH] UBIFS - new flash file system Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 01/26] VFS: introduce writeback_inodes_sb() Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 02/26] UBIFS: add I/O sub-system Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 03/26] UBIFS: add flash scanning Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 04/26] UBIFS: add journal replay Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 05/26] UBIFS: add file-system build Artem Bityutskiy
2008-03-28 10:12   ` Andrew Morton
2008-03-28 11:04     ` Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 06/26] UBIFS: add superblock and master node Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 07/26] UBIFS: add file-system recovery Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 08/26] UBIFS: add compression support Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 09/26] UBIFS: add key helpers Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 10/26] UBIFS: add the journal Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 11/26] UBIFS: add commit functionality Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 12/26] UBIFS: add TNC implementation Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 13/26] UBIFS: add TNC commit implementation Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 14/26] UBIFS: add TNC shrinker Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 15/26] UBIFS: add LEB properties Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 16/26] UBIFS: add LEB properties tree Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 17/26] " Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 18/26] UBIFS: add LEB find subsystem Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 19/26] UBIFS: add Garbage Collector Artem Bityutskiy
2008-04-01  2:11   ` Arnd Bergmann
2008-03-27 14:55 ` [RFC PATCH 20/26] UBIFS: add VFS operations Artem Bityutskiy
2008-03-27 13:36   ` Andi Kleen
2008-03-27 13:42     ` Artem Bityutskiy
2008-04-01 12:08   ` Pekka Enberg
2008-04-01 12:42     ` Artem Bityutskiy
2008-04-01 13:12       ` Pekka Enberg
2008-04-01 14:04         ` Artem Bityutskiy
2008-04-01 15:14           ` Adrian Hunter
2008-03-27 14:55 ` [RFC PATCH 21/26] UBIFS: add budgeting Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 22/26] UBIFS: add extended attribute support Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 23/26] UBIFS: add orphans handling sub-system Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 24/26] UBIFS: add header files Artem Bityutskiy
2008-03-27 14:55 ` [RFC PATCH 25/26] UBIFS: add debugging stuff Artem Bityutskiy
2008-03-31 21:00   ` Pekka Enberg
2008-04-01  6:20     ` Artem Bityutskiy
2008-04-01  7:33       ` Pekka Enberg
2008-04-01  8:32         ` Artem Bityutskiy
2008-04-01  9:00           ` Pekka Enberg
2008-04-01  9:04             ` Artem Bityutskiy
2008-04-01  8:34         ` Adrian Hunter
2008-04-01  7:43       ` Pekka Enberg
2008-03-27 14:55 ` [RFC PATCH 26/26] UBIFS: include FS to compilation Artem Bityutskiy
2008-04-01  7:39   ` Pekka Enberg
2008-04-01  8:51     ` Artem Bityutskiy
2008-04-01  9:15       ` Pekka Enberg
2008-04-01  9:25         ` Artem Bityutskiy
2008-04-01 10:04           ` Pekka Enberg
2008-04-01 10:26             ` Artem Bityutskiy
2008-04-01 11:33               ` Pekka Enberg
2008-04-01 11:56                 ` Artem Bityutskiy
2008-04-26  9:37                 ` Christoph Hellwig
2008-04-28  7:10                   ` Adrian Hunter
2008-04-28  9:03                     ` ext Christoph Hellwig
2008-04-30  7:04                       ` Adrian Hunter
2008-04-26  9:35       ` Christoph Hellwig
2008-04-28  7:09         ` Adrian Hunter
2008-04-28  9:00           ` ext Christoph Hellwig
2008-04-28 11:23             ` Adrian Hunter
2008-04-28 11:39               ` ext ext Christoph Hellwig
2008-04-28 12:25                 ` Adrian Hunter
2008-04-28 13:02                   ` Christoph Hellwig
2008-03-27 16:20 ` [RFC PATCH] UBIFS - new flash file system Josh Boyer
2008-03-28  6:17   ` Artem Bityutskiy
2008-03-28  6:45 ` Artem Bityutskiy
2008-03-31 12:29 ` Jan Engelhardt
2008-03-31 12:47   ` Adrian Hunter
2008-03-31 13:20     ` Jörn Engel
2008-03-31 14:00       ` Artem Bityutskiy
2008-03-31 17:17         ` Jörn Engel
2008-03-31 20:49           ` Pekka Enberg
2008-03-31 21:21             ` Jörn Engel
2008-04-01  6:00               ` Artem Bityutskiy
2008-04-01  5:26       ` UBIFS vs Logfs (was [RFC PATCH] UBIFS - new flash file system) Artem Bityutskiy
2008-04-01  5:28         ` Artem Bityutskiy
2008-04-01  5:56         ` Artem Bityutskiy
2008-04-01  9:25           ` Jörn Engel
2008-04-01  9:39             ` Artem Bityutskiy
2008-04-01 10:51               ` Jörn Engel
2008-04-01 11:17                 ` Artem Bityutskiy
2008-04-01  9:19         ` Jörn Engel
2008-04-01  9:46           ` Artem Bityutskiy
2008-04-01 11:16             ` Jörn Engel
2008-03-31 13:40   ` [RFC PATCH] UBIFS - new flash file system Jörn Engel
2008-04-01 21:01 ` Matthieu CASTET
2008-04-03  7:07   ` Artem Bityutskiy
2008-04-18  9:05 ` Thomas Gleixner

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).