diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-08-04 21:14:47 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-09-10 14:03:30 -0700 |
commit | c5d02785c59dd8ee20031d742003daff8df73e2d (patch) | |
tree | 7de44975b613dd2b6396f4f1a3e104686ee6e12e /fs/f2fs/gc.c | |
parent | 6f3a01ae9b72d5b7c57632632b8c8088db11e7ab (diff) |
f2fs: inherit mtime of original block during GC
Don't let f2fs inner GC ruins original aging degree of segment.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 4ac8ce6ac2a3..697908c333e2 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -879,7 +879,7 @@ static int move_data_block(struct inode *inode, block_t bidx, } f2fs_allocate_data_block(fio.sbi, NULL, fio.old_blkaddr, &newaddr, - &sum, CURSEG_COLD_DATA, NULL); + &sum, CURSEG_COLD_DATA, NULL, true); fio.encrypted_page = f2fs_pagecache_get_page(META_MAPPING(fio.sbi), newaddr, FGP_LOCK | FGP_CREAT, GFP_NOFS); @@ -929,7 +929,7 @@ put_page_out: recover_block: if (err) f2fs_do_replace_block(fio.sbi, &sum, newaddr, fio.old_blkaddr, - true, true); + true, true, true); up_out: if (lfs_mode) up_write(&fio.sbi->io_order_lock); |