Message ID | 20241022111059.2566137-17-yi.zhang@huaweicloud.com |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=y+r8=RS=vger.kernel.org=linux-ext4+bounces-4697-patchwork-incoming=ozlabs.org@ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=y+r8=rs=vger.kernel.org=linux-ext4+bounces-4697-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XXckY3ps8z1xw0 for <incoming@patchwork.ozlabs.org>; Tue, 22 Oct 2024 14:15:33 +1100 (AEDT) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4XXckX127mz4w2M for <incoming@patchwork.ozlabs.org>; Tue, 22 Oct 2024 14:15:32 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4XXckX0zlLz4wb7; Tue, 22 Oct 2024 14:15:32 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; arc=pass smtp.remote-ip="2604:1380:4601:e00::3" arc.chain=subspace.kernel.org ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1729566932; cv=pass; b=h2kmxT1WcBtH3mF8DjYR+STWwmTvEvkANIaXdoH4sKpx5FBywwo90KunKFJy4tnGiSCrEmLrNklQQYyGTf4+lQbY6AdoIL3P3zmhkR3LI6oILGxYE/LDS9QY6YgYgbuW7ujG2LZbSQqDwm07IgytjLvx/O8yOmHOJY8qapGX2ezpKB5cs2mNT0wCwrVV4W3mlvLWrnBZnZWKm5T3f7hKZtZwhTbfvXSc1F/MQxA3/I4RDq38Jzmafjip3o5k5MkV6mIX3PkKUClJ5AjlJrBskNb+WVMuGg17ZU3Gndq7TSvuoeGTBZBzNYyYjmM1mgHgxVZTks0F7HB3G+IH7Y4Y5g== ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1729566932; c=relaxed/relaxed; bh=LQs8+ix+QcHPW3o8mR0lLbVxv3eUtsxCfxD+12go7Zo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eV7d2MFHD429RkkmqAFDqQDzKjkXd3OybK56toyomAyIX/dCWI2H/rDaC8XE/k0IQS1XreStuWdAtvAofseCFuaDNDI4iZ2zjYJeZgMv5vVq7nUPeOM7Nf5nzFtpPdyYvNL738wOZiQxR4y5zYUdABJU+9Qelfmo5g3dnPpJSnrKYE/4CTe5cRWs1jd6sh9YwLFuEByQA0XEa1s/MhgsVtmgWI7U5hhtxqQzp7xFvXWdAzzdXqP5oze9d1SrPB61sA5jZLUVJcYVOiS40tZ0z+SsJKEdnbF3T0jaxu2hj7LXaVD8hrBOCh9Y0vBYVlX+UWyI/eHOzrrYZjJoHIDmag== ARC-Authentication-Results: i=2; gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-ext4+bounces-4697-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org Authentication-Results: gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-ext4+bounces-4697-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4XXckW4TDzz4w2M for <patchwork-incoming@ozlabs.org>; Tue, 22 Oct 2024 14:15:31 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CDA481F2477A for <patchwork-incoming@ozlabs.org>; Tue, 22 Oct 2024 03:15:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 014281AA788; Tue, 22 Oct 2024 03:13:05 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) (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 47C2B1494D8; Tue, 22 Oct 2024 03:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729566784; cv=none; b=CMcP0xUkL2PuEDiLi8VuKhXPrsb99eVrT5ZduHEx7vYpyAaSEahAmE8FP3vpQUJ+zYq9tMW5lQfqzAaqRpXbi1NwNZm8PLqFIO9+0G77XnGBlThwbNlVs/mlC1Wat3DBowNB21qZ7xU+PxszWHGu2o6vWEvDmIa+kzjhZ331X6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729566784; c=relaxed/simple; bh=JtRQRisxrHnV8IY4GtAev6/mcJf6zvVRjOwlQ8nLm5M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Awj37Oi5zY/OASHTDzf8+f16e6tda/sPAmb58o8TYUKp7bL/i9MZQMB8C8w7ZiyP+zyZpzjUIhtboN5GzKOnF7oxzDitlK1Vn8EEf7GrEg1ZLdzPBYLyPJBwnpT3xDfMO7t/ZD0TSm1jleL6tNgY11qxaA3cCUwPImk1ZVe4eCw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=none smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4XXcgM0yXXz4f3jkk; Tue, 22 Oct 2024 11:12:47 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 64E721A018C; Tue, 22 Oct 2024 11:12:59 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.112.188]) by APP4 (Coremail) with SMTP id gCh0CgCXysYlGBdnPSwWEw--.716S20; Tue, 22 Oct 2024 11:12:59 +0800 (CST) From: Zhang Yi <yi.zhang@huaweicloud.com> To: linux-ext4@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, ritesh.list@gmail.com, hch@infradead.org, djwong@kernel.org, david@fromorbit.com, zokeefe@google.com, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, chengzhihao1@huawei.com, yukuai3@huawei.com, yangerkun@huawei.com Subject: [PATCH 16/27] ext4: don't order data for inode with EXT4_STATE_BUFFERED_IOMAP Date: Tue, 22 Oct 2024 19:10:47 +0800 Message-ID: <20241022111059.2566137-17-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241022111059.2566137-1-yi.zhang@huaweicloud.com> References: <20241022111059.2566137-1-yi.zhang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: <linux-ext4.vger.kernel.org> List-Subscribe: <mailto:linux-ext4+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-ext4+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgCXysYlGBdnPSwWEw--.716S20 X-Coremail-Antispam: 1UD129KBjvdXoWrtr48GFy3AF4rGF4fCryfJFb_yoWkGrc_Ga s7Ar48K34SvF1xWFWFkr15Xas29r48Wr1rWFZ5tr4fuFyUJrs7Aw1kZrsrZry5Wr42kF9x Cry8Gr1rt3W2gjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbQAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVWxJr0_GcWl84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vE x4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2 IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4U McvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I64 8v4I1lFIxGxcIEc7CjxVA2Y2ka0xkIwI1lc7CjxVAaw2AFwI0_Jw0_GFyl42xK82IYc2Ij 64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x 8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r4a6rW5MIIYrxkI7VAKI48JMIIF0xvE 2Ix0cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1lIxAIcV CF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Gr1j6F4UJbIYCTnIWIevJa73UjIFyTuYvjTRio7uDUUUU X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ |
Series |
ext4: use iomap for regular file's buffered I/O path and enable large folio
|
expand
|
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h index 0c77697d5e90..9dca10027032 100644 --- a/fs/ext4/ext4_jbd2.h +++ b/fs/ext4/ext4_jbd2.h @@ -467,6 +467,14 @@ static inline int ext4_should_journal_data(struct inode *inode) static inline int ext4_should_order_data(struct inode *inode) { + /* + * There is no need to order data for inodes with iomap buffered I/O + * path since it always allocate unwritten extents for new allocated + * blocks and have no risk of stale data. + */ + if (ext4_test_inode_state(inode, EXT4_STATE_BUFFERED_IOMAP)) + return 0; + return ext4_inode_journal_mode(inode) & EXT4_INODE_ORDERED_DATA_MODE; }