f2fs: introduce F2FS_FEATURE_LOST_FOUND feature
authorSheng Yong <shengyong1@huawei.com>
Thu, 15 Mar 2018 10:51:41 +0000 (18:51 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 8 Apr 2018 11:14:28 +0000 (04:14 -0700)
commit5786b414a719b95add6005f47cd3adfdf440eb3d
tree5aa6cc8551a02e2a23a11f4f65303217161973ed
parent9813cae680f06967c8b79467d93a20086bcd7ef4
f2fs: introduce F2FS_FEATURE_LOST_FOUND feature

This patch introduces a new feature, F2FS_FEATURE_LOST_FOUND, which
is set by mkfs. mkfs creates a directory named lost+found, which saves
unreachable files. If fsck finds a file which has no parent, or its
parent is removed by fsck, the file will be placed under lost+found
directory by fsck.

lost+found directory could not be encrypted. As a result, the root
directory cannot be encrypted too. So if LOST_FOUND feature is enabled,
let's avoid to encrypt root directory.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/super.c
fs/f2fs/sysfs.c