mkfs.f2fs: create lost+found directory
authorSheng Yong <shengyong1@huawei.com>
Tue, 6 Mar 2018 03:39:39 +0000 (11:39 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 7 May 2018 21:49:38 +0000 (14:49 -0700)
commitff3782931fcb168f16e9028a040db8ce94b4deed
tree0d18fb42a64ae271907e467699cd419e5436fc98
parent1325c930bb64621abcc4e5d393ebe7154d78e4f8
mkfs.f2fs: create lost+found directory

This patch introduces a new feature F2FS_FEATURE_LOST_FOUND. It can be
switched on by indicating `-O lost_found'. If LOST_FOUND feature is
enabled, an empty directory lost+found is created by mkfs.

This is a preparation for fsck. During fsck, the directory is used to
save unreachable files, which have no parent directory or their parent
directory is removed by fsck. Encrypted files are also allowed to be
saved here.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: use uint64_t to avoid build warning]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/mount.c
include/f2fs_fs.h
mkfs/f2fs_format.c
mkfs/f2fs_format_main.c