Received: by 10.223.185.116 with SMTP id b49csp770036wrg; Sat, 10 Feb 2018 19:36:02 -0800 (PST) X-Google-Smtp-Source: AH8x226LJt+yv4aHuNSGHpGkCcHS4AHJlimrqb90sKlWfT10TySplSAhuo5VJ314z39tUpEY6TCy X-Received: by 10.98.15.130 with SMTP id 2mr6435496pfp.62.1518320162405; Sat, 10 Feb 2018 19:36:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518320162; cv=none; d=google.com; s=arc-20160816; b=jeIuL+bJYO6RM+9VBKklbgsGcShdei1QHWxIVhKcebUIoo0og+8gK8eiRfWb5YNb+L 4XMIQhWnLIwL08HgxMctaGP5i4VUHawOnP1zEySQOXluKbbtvr8e0Aut/5e6+c29enTE OoGR8pE1BhViPpkm4oZj93vcZErTH+L0cDEP40w+uH5odJJP5VyHv+sabz3zwlD1696z 84q3izBdbiZzmdLn/iKbiXnPwAK4Izfi/Euw1jy3807Ro7kyszhnRQUBSwW6qGjP5U3E 7jKVf4knLvZ3UwMRUUnJEp9ebg21Hor+nqTX/uo/GDAzHKmReA68vNpb77EvvSKKzh43 R+FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=4PkE5OcAdRb/xYUNUMxLqTg39KPup3myA+iHO56nrEg=; b=Sixf30vI/D6UC3yYMzsYn3DdRsNcPYQQc3kznnbjCB9IQrVA1ABeWAhgRLjBr9O7DJ pyh8+pz9q4/yD0FT6wB/3T80712+228xvLfLJP1kiQurDm+hVGAuDdEHTvVO6BBC9a13 zVQG44NrFMaj+v2TqnQ4OURPAFAQnflgWtmbL8qDkPoHx9km6Zp2e41zJIxuOkvZCiVg IOVkIzCszNKGMgGvl8q0QHNJbbje2l/pLZBjqicHqzTqmJme8NNPOFDKq1d0GNbYAI61 Vf6b2n5RIzygHd0uGzm8UU7yloTgk3VQJVEbU4uwCoOdNQ4pEu3s7O6L/cdsNkUJ/BFz uqjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l63-v6si3906025plb.565.2018.02.10.19.35.48; Sat, 10 Feb 2018 19:36:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374AbeBKDfK (ORCPT + 99 others); Sat, 10 Feb 2018 22:35:10 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:52184 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751921AbeBKDfJ (ORCPT ); Sat, 10 Feb 2018 22:35:09 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B2EBB392F79B6; Sun, 11 Feb 2018 11:35:05 +0800 (CST) Received: from [127.0.0.1] (10.111.220.140) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.361.1; Sun, 11 Feb 2018 11:34:56 +0800 Subject: Re: [PATCH] f2fs: set_code_data in move_data_block To: , , , CC: , , , , , References: <1518093217-123705-1-git-send-email-yunlong.song@huawei.com> From: Yunlong Song Message-ID: Date: Sun, 11 Feb 2018 11:34:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1518093217-123705-1-git-send-email-yunlong.song@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.220.140] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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)) > -- Thanks, Yunlong Song