From nobody Tue Dec 16 23:45:08 2025 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE823C121 for ; Wed, 17 Jan 2024 08:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=222.66.158.135 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705478479; cv=none; b=r1DajZAjXiUfLWIZJJLjMRn7Nm85PhiQZVkwy8Z99qxT1ozma80ebr/pP0xNaw3TN9TPFS/aXSGlmQNUCO5zamOwh9LJtHuWxj1N74BSjYxsoz8zww/ay6fJllLr75JgA9nvvqIf6fTlABPdt2eESfa5vRlJUyMwNaOWLIwKmgc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705478479; c=relaxed/simple; bh=vwhxEp2wpjBY8CexZazYe+X4/DLWJyxdJA8fDyNFxYc=; h=Received:Received:Received:From:To:CC:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Type:X-Originating-IP: X-ClientProxiedBy:X-MAIL; b=adEMujPON42lbW8xiBJ+sJ6WQ1NxdSES3QVCWmDHXl8HJdGGaL+9TEeomqcnsKHyVSduASfPO9ur4rVqWbNIi0XZllF4xad3HGZmc/wuxFblWXDii+iTSqqogR3wQLj38VX45ALvpttWsQjnknQHS9G2+oln16ANgSaX8p8dRwc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com; spf=pass smtp.mailfrom=unisoc.com; arc=none smtp.client-ip=222.66.158.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 40H80Onq001047; Wed, 17 Jan 2024 16:00:24 +0800 (+08) (envelope-from Zhiguo.Niu@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4TFJ5k6lPYz2RN15k; Wed, 17 Jan 2024 15:53:14 +0800 (CST) Received: from bj08434pcu.spreadtrum.com (10.0.73.87) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 17 Jan 2024 16:00:22 +0800 From: Zhiguo Niu To: , CC: , , , , Subject: [PATCH] f2fs: use IS_INODE replace IS_DNODE in f2fs_flush_inline_data Date: Wed, 17 Jan 2024 15:59:58 +0800 Message-ID: <1705478398-10890-1-git-send-email-zhiguo.niu@unisoc.com> X-Mailer: git-send-email 1.9.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com 40H80Onq001047 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now IS_DNODE is used in f2fs_flush_inline_data and it has some problems: 1. Just only inodes may include inline data,not all direct nodes 2. When system IO is busy, it is inefficient to lock a direct node page but not an inode page. Besides, if this direct node page is being locked by others for IO, f2fs_flush_inline_data will be blocked here, which will affects the checkpoint process, this is unreasonable. So IS_INODE should be used in f2fs_flush_inline_data. Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 541c4ad..a8fe49a3 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1919,7 +1919,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) for (i =3D 0; i < nr_folios; i++) { struct page *page =3D &fbatch.folios[i]->page; =20 - if (!IS_DNODE(page)) + if (!IS_INODE(page)) continue; =20 lock_page(page); --=20 1.9.1