diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-08-29 17:58:34 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-08 02:27:38 +0200 |
commit | 275b66b09e85cf0520dc610dd89706952751a473 (patch) | |
tree | 9fc6b695893ea53d227b874cff443c766e56800d /fs/f2fs/recovery.c | |
parent | f2fs: set encryption name flag in add inline entry path (diff) | |
download | linux-275b66b09e85cf0520dc610dd89706952751a473.tar.xz linux-275b66b09e85cf0520dc610dd89706952751a473.zip |
f2fs: support async discard
Like most filesystems, f2fs will issue discard command synchronously, so
when user trigger fstrim through ioctl, multiple discard commands will be
issued serially with sync mode, which makes poor performance.
In this patch we try to support async discard, so that all discard
commands can be issued and be waited for endio in batch to improve
performance.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 9e652d5a659b..2f38bbbeec2c 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -636,6 +636,8 @@ out: invalidate = true; } + f2fs_wait_all_discard_bio(sbi); + /* Flush all the NAT/SIT pages */ while (get_pages(sbi, F2FS_DIRTY_META)) sync_meta_pages(sbi, META, LONG_MAX); |