linux/fs/ubifs
Artem Bityutskiy 67e753ca41 UBIFS: make space fixup work in the remount case
The UBIFS space fixup is a useful feature which allows to fixup the "broken"
flash space at the time of the first mount. The "broken" space is usually the
result of using a "dumb" industrial flasher which is not able to skip empty
NAND pages and just writes all 0xFFs to the empty space, which has grave
side-effects for UBIFS when UBIFS trise to write useful data to those empty
pages.

The fix-up feature works roughly like this:
1. mkfs.ubifs sets the fixup flag in UBIFS superblock when creating the image
   (see -F option)
2. when the file-system is mounted for the first time, UBIFS notices the fixup
   flag and re-writes the entire media atomically, which may take really a lot
   of time.
3. UBIFS clears the fixup flag in the superblock.

This works fine when the file system is mounted R/W for the very first time.
But it did not really work in the case when we first mount the file-system R/O,
and then re-mount R/W. The reason was that we started the fixup procedure too
late, which we cannot really do because we have to fixup the space before it
starts being used.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Reported-by: Mark Jackson <mpfj-list@mimc.co.uk>
Cc: stable@vger.kernel.org # 3.0+
2013-03-14 11:20:22 +02:00
..
budget.c
commit.c
compress.c
debug.c
debug.h
dir.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
file.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
find.c
gc.c
io.c
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
journal.c
Kconfig
key.h
log.c
lprops.c
lpt_commit.c
lpt.c
Makefile
master.c
misc.h
orphan.c UBIFS: fix double free of ubifs_orphan objects 2013-02-04 12:31:48 +02:00
recovery.c
replay.c
sb.c
scan.c
shrinker.c
super.c UBIFS: make space fixup work in the remount case 2013-03-14 11:20:22 +02:00
tnc_commit.c
tnc_misc.c
tnc.c
ubifs-media.h
ubifs.h UBIFS: fix double free of ubifs_orphan objects 2013-02-04 12:31:48 +02:00
xattr.c