]> git.karo-electronics.de Git - karo-tx-linux.git/commit
f2fs: do not recover wrong data index
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 2 Apr 2015 02:38:20 +0000 (19:38 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Apr 2015 22:08:59 +0000 (15:08 -0700)
commite03b07d9084d03e896b7f1a598a7f6aa18f6eeda
tree430a37a5bd068ca4ba05c4f7cd256b85edc74d91
parent418f6c277011d89c394309e72df9ad058e0a3f7d
f2fs: do not recover wrong data index

During the roll-forward recovery, if we found a new data index written fsync
lastly, we need to recover new block address.
But, if that address was corrupted, we should not recover that.
Otherwise, f2fs gets kernel panic from:

 In check_index_in_prev_nodes(),

    sentry = get_seg_entry(sbi, segno);
             --------------------------> out-of-range segno.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/recovery.c