diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-05-26 09:00:13 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-31 11:31:51 -0700 |
commit | 107a805de87ec071dab602071c14e67b98b0c519 (patch) | |
tree | 543c688ea92b6651a9bb03b4a7bd09d728aab754 /fs/f2fs/super.c | |
parent | e5e5732d8120654159254c16834bc8663d8be124 (diff) | |
download | linux-next-107a805de87ec071dab602071c14e67b98b0c519.tar.gz |
f2fs: keep migration IO order in LFS mode
For non-migration IO, we will keep order of data/node blocks' submitting
as allocation sequence by sorting IOs in per log io_list list, but for
migration IO, it could be out-of-order.
In LFS mode, we should keep all IOs including migration IO be ordered,
so that this patch fixes to add an additional lock to keep submitting
order.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 51dca3932e8d..12282b144651 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2369,6 +2369,7 @@ static void init_sb_info(struct f2fs_sb_info *sbi) for (i = 0; i < NR_PAGE_TYPE - 1; i++) for (j = HOT; j < NR_TEMP_TYPE; j++) mutex_init(&sbi->wio_mutex[i][j]); + init_rwsem(&sbi->io_order_lock); spin_lock_init(&sbi->cp_lock); sbi->dirty_device = 0; |