linux/fs/ubifs
Anatolij Gustschin 19495f70d1 UBIFS: fix master node recovery
When the 1st LEB was unmapped and written but 2nd LEB not,
the master node recovery doesn't succeed after power cut.
We see following error when mounting UBIFS partition on NOR
flash:

UBIFS error (pid 1137): ubifs_recover_master_node: failed to recover master node

Correct 2nd master node offset check is needed to fix the
problem. If the 2nd master node is at the end in the 2nd LEB,
first master node is used for recovery. When checking for this
condition we should check whether the master node is exactly at
the end of the LEB (without remaining empty space) or whether
it is followed by an empty space less than the master node size.

Artem: when the error happened, offs2 = 261120, sz = 512, c->leb_size = 262016.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
2011-07-08 06:53:18 +03:00
..
budget.c UBIFS: introduce a separate structure for budgeting info 2011-05-13 19:23:53 +03:00
commit.c UBIFS: lessen amount of debugging check types 2011-07-04 10:54:28 +03:00
compress.c UBIFS: fix sparse warnings 2008-12-31 14:13:24 +02:00
debug.c UBIFS: improve power cut emulation testing 2011-07-04 10:54:34 +03:00
debug.h UBIFS: rename recovery testing variables 2011-07-04 10:54:34 +03:00
dir.c UBIFS: introduce helper functions for debugging checks and tests 2011-07-04 10:54:28 +03:00
file.c UBIFS: amend debugging inode size check function prototype 2011-07-04 10:54:27 +03:00
find.c UBIFS: introduce a separate structure for budgeting info 2011-05-13 19:23:53 +03:00
gc.c UBIFS: synchronize write-buffer before switching to the next bud 2011-05-16 10:31:41 +03:00
io.c UBIFS: remove custom list of superblocks 2011-07-04 10:54:33 +03:00
ioctl.c userns: rename is_owner_or_cap to inode_owner_or_capable 2011-03-23 19:47:13 -07:00
journal.c UBIFS: fix memory leak on error path 2011-06-03 18:12:31 +03:00
Kconfig UBIFS: do not select KALLSYMS_ALL 2011-04-05 10:45:45 +03:00
key.h UBIFS: mark unused key objects as invalid 2010-08-30 10:19:08 +03:00
log.c UBIFS: switch to I/O helpers 2011-07-04 10:54:33 +03:00
lprops.c UBIFS: introduce helper functions for debugging checks and tests 2011-07-04 10:54:28 +03:00
lpt_commit.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
lpt.c UBIFS: switch to I/O helpers 2011-07-04 10:54:33 +03:00
Makefile
master.c UBIFS: introduce a separate structure for budgeting info 2011-05-13 19:23:53 +03:00
misc.h UBIFS: introduce more I/O helpers 2011-07-04 10:54:33 +03:00
orphan.c UBIFS: introduce helper functions for debugging checks and tests 2011-07-04 10:54:28 +03:00
recovery.c UBIFS: fix master node recovery 2011-07-08 06:53:18 +03:00
replay.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
sb.c UBIFS: switch to I/O helpers 2011-07-04 10:54:33 +03:00
scan.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
shrinker.c UBIFS: fix shrinker object count reports 2011-06-03 18:12:24 +03:00
super.c UBIFS: switch to I/O helpers 2011-07-04 10:54:33 +03:00
tnc_commit.c UBIFS: lessen amount of debugging check types 2011-07-04 10:54:28 +03:00
tnc_misc.c UBIFS: correct key comparison 2008-09-30 11:12:57 +03:00
tnc.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
ubifs-media.h UBIFS: add a superblock flag for free space fix-up 2011-05-16 14:12:14 +03:00
ubifs.h UBIFS: introduce more I/O helpers 2011-07-04 10:54:33 +03:00
xattr.c UBIFS: make xattr operations names consistent 2011-05-13 19:23:54 +03:00