f2fs: give correct trimmed blocks in fstrim
authorChao Yu <yuchao0@huawei.com>
Sat, 28 Oct 2017 08:52:32 +0000 (16:52 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 19 Dec 2017 03:28:29 +0000 (19:28 -0800)
commitca50229b7ef586d84e9a9afd3a0b6374b3f4d62e
treeb822c98e0202070282c1f4724236c81e7130767f
parent73b8db889f80ec53c60e0220aa2f8e2c42c6d3ab
f2fs: give correct trimmed blocks in fstrim

We have supported to issue discard in specified range during fstrim,
it needs to return caller with successfully trimmed bytes in that
range instead of bytes of invalid blocks which are scanned in
checkpoint.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/segment.c