f2fs-tools: support to set and recognize CP_TRIMMED_FLAG
authorChao Yu <yuchao0@huawei.com>
Fri, 28 Apr 2017 09:16:31 +0000 (17:16 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 28 Apr 2017 19:04:21 +0000 (12:04 -0700)
commitf642b24822c6cba5808a7517f23d423b05e57c8c
treef4eb26fcba4e95d3a5e1a99341f600e4a1764438
parent892e1542e745d1e504093487dc633b5ef8345be1
f2fs-tools: support to set and recognize CP_TRIMMED_FLAG

During mkfs, once we have issued discard for all device, we can set
CP_TRIMMED_FLAG in cp pack, this can make kernel module to record
undiscard blocks correctly, it will help to avoid unneeded discard.

Also this patch makes f2fs-tools be with the ability of recognizing
that new flag.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/mount.c
include/f2fs_fs.h
lib/libf2fs.c
mkfs/f2fs_format.c
mkfs/f2fs_format_utils.c