android_kernel_oneplus_msm8998/fs/f2fs
Jaegeuk Kim 87a597c7a7 f2fs: relax node version check for victim data in gc
[ Upstream commit c13ff37e359bb3eacf4e1760dcea8d9760aa7459 ]

- has_not_enough_free_secs
node_secs: 0  dent_secs: 0  freed:0  free_segments:103  reserved:104

          - f2fs_gc
             - get_victim_by_default
alloc_mode 0, gc_mode 1, max_search 2672, offset 4654, ofs_unit 1

                - do_garbage_collect
start_segno 3976, end_segno 3977   type 0

                  - is_alive
nid 22797, blkaddr 2131882, ofs_in_node 0, version 0x8/0x0

                   - gc_data_segment 766, segno 3976, block 512/426 not alive

So, this patch fixes subtle corrupted case where node version does not match
to summary version which results in infinite loop by gc.

Reported-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22 09:23:22 +01:00
..
acl.c f2fs: Don't clear SGID when inheriting ACLs 2017-07-27 15:06:07 -07:00
acl.h
checkpoint.c
crypto.c f2fs crypto: replace some BUG_ON()'s with error checks 2017-10-27 10:23:18 +02:00
crypto_fname.c f2fs crypto: replace some BUG_ON()'s with error checks 2017-10-27 10:23:18 +02:00
crypto_key.c fscrypt: fix dereference of NULL user_key_payload 2017-10-27 10:23:18 +02:00
crypto_policy.c fscrypt: fix context consistency check when key(s) unavailable 2017-05-25 14:30:11 +02:00
data.c f2fs: do not wait for writeback in write_begin 2017-10-21 17:09:05 +02:00
debug.c f2fs: set ->owner for debugfs status file's file_operations 2017-01-06 11:16:13 +01:00
dir.c fscrypt: avoid collisions when presenting long encrypted filenames 2017-05-25 14:30:11 +02:00
extent_cache.c f2fs: fix a bug caused by NULL extent tree 2018-03-03 10:19:41 +01:00
f2fs.h f2fs: check entire encrypted bigname when finding a dentry 2017-05-25 14:30:11 +02:00
f2fs_crypto.h fscrypt: remove broken support for detecting keyring key revocation 2017-03-31 09:49:54 +02:00
file.c fscrypto: require write access to mount to set encryption policy 2017-10-27 10:23:18 +02:00
gc.c f2fs: relax node version check for victim data in gc 2018-03-22 09:23:22 +01:00
gc.h
hash.c f2fs: check entire encrypted bigname when finding a dentry 2017-05-25 14:30:11 +02:00
inline.c f2fs: check entire encrypted bigname when finding a dentry 2017-05-25 14:30:11 +02:00
inode.c don't put symlink bodies in pagecache into highmem 2018-02-16 20:09:38 +01:00
Kconfig
Makefile
namei.c don't put symlink bodies in pagecache into highmem 2018-02-16 20:09:38 +01:00
node.c
node.h
recovery.c f2fs: check hot_data for roll-forward recovery 2017-09-27 11:00:12 +02:00
segment.c
segment.h
shrinker.c
super.c f2fs: sanity check checkpoint segno and blkoff 2017-08-11 09:08:51 -07:00
trace.c
trace.h
xattr.c
xattr.h