From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbeBKDub (ORCPT ); Sat, 10 Feb 2018 22:50:31 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:5190 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751921AbeBKDua (ORCPT ); Sat, 10 Feb 2018 22:50:30 -0500 Subject: Re: [PATCH] f2fs: set_code_data in move_data_block To: Yunlong Song , , , CC: , , , , , References: <1518093217-123705-1-git-send-email-yunlong.song@huawei.com> From: Chao Yu Message-ID: <520ce370-daa0-0654-3992-be01e8d82607@huawei.com> Date: Sun, 11 Feb 2018 11:50:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/2/11 11:34, Yunlong Song wrote: > Ping... > > move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will > lack these data pages in move_data_block, and write_checkpoint can > not make sure this pages committed to the flash. Hmm.. data block migration is running based on meta inode, so it will be safe since checkpoint will flush all meta pages including encrypted pages cached in meta inode? Thanks, > > On 2018/2/8 20:33, Yunlong Song wrote: >> Signed-off-by: Yunlong Song >> --- >> fs/f2fs/gc.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c >> index b9d93fd..2095630 100644 >> --- a/fs/f2fs/gc.c >> +++ b/fs/f2fs/gc.c >> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx, >> fio.op = REQ_OP_WRITE; >> fio.op_flags = REQ_SYNC; >> fio.new_blkaddr = newaddr; >> + set_cold_data(fio.page); >> err = f2fs_submit_page_write(&fio); >> if (err) { >> if (PageWriteback(fio.encrypted_page)) >> >