Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp627687ybt; Mon, 6 Jul 2020 18:39:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI6vd+t5ymEkqktdFsnvK9oPrShz0ulBkNUEiooWI0lEj7Ki4R9Q9X5R6qDlCy+VUIeYAj X-Received: by 2002:aa7:d848:: with SMTP id f8mr49798968eds.329.1594085940942; Mon, 06 Jul 2020 18:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594085940; cv=none; d=google.com; s=arc-20160816; b=UGwtvd1gAXc/4OtyS4XftMR3XUQm1ONezStxqhL5eHXIrhUM58GONfANvg5Tu/HEX8 uCU69Er6b7DcgeHTRhyNhFmN0oEwXud6mDb2+qjT03BZmZUVyPY4P/zg/HvGPWl2Eqt8 cpHk1XOyKuETMWe5bdGRmHDF2Ajiukfab4ymFn2CywYlUVsfaofNiTUYz5Fbf/N7aTP8 TfNcTLJIwdBPzocdDsHDGCl90q3LUgOK86+e50WBpJLe95yd0rMid/F7GY78KwC90wIM Jy5jL5Dwn7acFd2w1hChq+r741zVlXa4VXBxnqM1TMEXp4h3a9cQI4cPA7TXPcD+V4HH rUug== 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:mime-version :message-id:date:subject:cc:to:from; bh=PGn95N5IYfoWEISwfpA4yAdB5JS2kd3eFg0Nm2rpS0M=; b=q1u8cHzsT4n2lRSS2zZufruiZJYxLvrh7nqrBqixYbQy/xRFjM3ho9ryglsTRq3A3Q EeT/nDWV+IAY2+62E+rvsUHtWSDw7fpBnPU+Cz3thlIGPd4ocODuRi6UBkudqWTCUFqt r+BJb4LF5wTnt8kVEaT2xQoLRieDXojtEZ49e0vw2SI7kZ4Dj86LdkKPhYcaNFRfp+eq NSJxeHspoyCijxR9Zwi2P3VgcCnE5yzzHsAoeUYBXw5lBMgeYt2pf4JsY6C7WDYvtQkJ Qke0QSX2gp7iRcLbUzZvszChcFKIajuSVxMSkMFxa01A02KhlKz46KcCXy88kPkcfxk4 jbyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e12si15202712edy.476.2020.07.06.18.38.37; Mon, 06 Jul 2020 18:39:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbgGGBfz (ORCPT + 99 others); Mon, 6 Jul 2020 21:35:55 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48210 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726918AbgGGBfz (ORCPT ); Mon, 6 Jul 2020 21:35:55 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3911B215BCAADAAE62B6; Tue, 7 Jul 2020 09:35:53 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Tue, 7 Jul 2020 09:35:44 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH] f2fs: don't keep meta inode pages used for compressed block migration Date: Tue, 7 Jul 2020 09:35:41 +0800 Message-ID: <20200707013541.26165-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org meta inode's pages are used for encrypted, verity and compressed blocks, so the meta inode's cache invalidation condition in do_checkpoint() should consider compression as well, not just for verity and encryption, fix it. Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 415bd120e561..c5593a6f9240 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1515,9 +1515,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) /* * invalidate intermediate page cache borrowed from meta inode which are - * used for migration of encrypted or verity inode's blocks. + * used for migration of encrypted, verity or compressed inode's blocks. */ - if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi)) + if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi) || + f2fs_sb_has_compression(sbi)) invalidate_mapping_pages(META_MAPPING(sbi), MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1); -- 2.26.2