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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user