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>
Mon, 6 Nov 2017 00:41:56 +0000 (16:41 -0800)
commit0ea805129d1bc5dacb588392d191f686c91a70bb
tree152f3e4f4422194e16f98428a87dbd732be87938
parentd62fe971485f15fa08fec2a75ac4e4ffead40a5a
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