Message ID | 20240127015825.1608160-22-yi.zhang@huaweicloud.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2AA3C47DA9 for <linux-mm@archiver.kernel.org>; Sat, 27 Jan 2024 02:03:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79DDC6B00A1; Fri, 26 Jan 2024 21:02:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 74FA66B00A5; Fri, 26 Jan 2024 21:02:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37D7F6B00A1; Fri, 26 Jan 2024 21:02:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 1A84B6B00A1 for <linux-mm@kvack.org>; Fri, 26 Jan 2024 21:02:59 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F24D4A2416 for <linux-mm@kvack.org>; Sat, 27 Jan 2024 02:02:58 +0000 (UTC) X-FDA: 81723442836.04.E333F61 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf01.hostedemail.com (Postfix) with ESMTP id 0332F40002 for <linux-mm@kvack.org>; Sat, 27 Jan 2024 02:02:56 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf01.hostedemail.com: domain of yi.zhang@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=yi.zhang@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706320977; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Mb/RznkrCjHh4Mh0dc5h2XBBULEP8om7It5ehGzqdY=; b=a8yUGjBebkf84D7yZ+oWppCP1jwmAr/2gS+/NPS/d/LGJDR6NALWIJN3OEAI7heMB5Y0GP k7WGnIo82Cpj0EnJYraQLO2g2Rb6oaAfbSsmxGq/b+BGAnMIZxK/FA8i4u82O3ymoBopBg uRPzQfXv3KhJNuueNhrGdTACCFcCUzw= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf01.hostedemail.com: domain of yi.zhang@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=yi.zhang@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706320977; a=rsa-sha256; cv=none; b=7Bdn0LnE0irOtys86XWpmwv/NM0FwaBVgshMVPLHDYYCCTfUTQ1Bd1ebm5oksnwFaI5/i2 Spjf15NFJraqRL5s/Aat0vEwHem8dhVPS/OYkVBOMJR/17ZFjMg1f/Yw2IwAUafkdfHsVO wVy5Vco11p1ErHQ1WGweIruWFurGqds= Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4TMHrk6Cd3z4f3lgC for <linux-mm@kvack.org>; Sat, 27 Jan 2024 10:02:46 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 3DACD1A017A for <linux-mm@kvack.org>; Sat, 27 Jan 2024 10:02:53 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgAX5g40ZLRlGJtmCA--.7377S25; Sat, 27 Jan 2024 10:02:53 +0800 (CST) From: Zhang Yi <yi.zhang@huaweicloud.com> To: linux-ext4@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.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, willy@infradead.org, zokeefe@google.com, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, chengzhihao1@huawei.com, yukuai3@huawei.com, wangkefeng.wang@huawei.com Subject: [RFC PATCH v3 21/26] ext4: implement zero_range iomap path Date: Sat, 27 Jan 2024 09:58:20 +0800 Message-Id: <20240127015825.1608160-22-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240127015825.1608160-1-yi.zhang@huaweicloud.com> References: <20240127015825.1608160-1-yi.zhang@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgAX5g40ZLRlGJtmCA--.7377S25 X-Coremail-Antispam: 1UD129KBjvJXoWxJr1ruF4Utw45Kr4DXr4rGrg_yoW8Jw4rpr n5KryUGr47Wr9F9F4xtF9rXr1Iy3W3Gr48Wry3Gr98Z343W3yxKFW5K3WFvF1jg3y7J3y0 qF45try0gw17Aa7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUP214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI kIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2 z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr1j6r xdM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0D M2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxan2 IY04v7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26ryj6F1UMIIF0xvE2Ix0cI8IcVCY1x0267AK xVW8Jr0_Cr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JV WxJwCI42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7VUbCe HDUUUUU== X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ X-Rspamd-Queue-Id: 0332F40002 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: mp95a7x3cntf639hacf65gu9kufbhfjp X-HE-Tag: 1706320976-221586 X-HE-Meta: U2FsdGVkX1+O14qs8H8EeZx6ywd0jdH/L/IdscXouBwDH6W/zb5mVYrkPBtGItnffUuzU6fXtWw6meaKyx1EaZM2H9Y+Vklm9mYkQy8mFaNTRIMQrx2zuxmPF8E1kZlo8GbfLi7Xs/HbjlduGGtPnYcZov2gzZZkIsoslvxgIb1SXL/VfENVFudORPFP1q1LuV74F/Aghre4xPJwMNVtFI2YI8AhKZOT32cED+uJLroNI6CdSzo3sQwwX4M5AX/cTlcRVZpAyZIEh/VQ0glbHIleRvbq8NpV53wWulO62oTSqtcjjcbCCwtqF1eQWKxUXuIBflnrOBAhSqRQtUN+t/CHi0uo4ity6nsM7tU9tqqRRWjGX5+Ev/C3BIkvnWpKlNTp9JE/EEAEc7ETy1AWosaMyCDByVnVqk6J9Z1M+fEn21hF58khYJ4ot4M55C27lY6xNzpppqXyF+Kvjv/jGD/DWH7fBG3sS3LRDH7//2Akh1653iWIq+CmIJVwAkxWLtnMkqhdYB8ur2aZLknA3KUqH4/dct43vwWni+m/lYhRtFZhrm1zMGKU2jyH2VkP6O4YJ4pJIrOhKgcIqgSsoGzCtDSpnO96xF5GNCHdDyC8zYnvw8hivFt2Cn4D1AKzOdVQgs86JEd/gCtIEW4zLpmUFxtiis4erN0Y5O2/zuG+ACQHXoAJX9L3nW2ewzHZDOXf53U8lCTWvhJ3/eIUAZ7dO+Dts/6KuHUCTrVIY3fHFhpKRebRFaPnKFoQuxW4TLL3D/ojw0YFT7mMzUcchbyuIZoDc/oyYYrYXYpGWeyZZNXGwo+uD+CwTNBPM0/rDA0su50uKQC/gY0tS4VDtBp3ayC5TOhRMgF+1rJybfbYe6Nkd2zxCd2nlUD9A4kBq6w1lqcT7tgtyLb8uj1B7K4XCK4KDjRogAG+vqzTz0PWDkUUJNgspTV8YjrwKIrq/M7qLIIoCby5XWLg7YN 2lgCiyum 3Dsf2tZAnDOjWIqMqT5lvpeZ7DbhgA+xeC52hcIYI7LCqVaGEsGmiUANGLA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
ext4: use iomap for regular file's buffered IO path and enable large foilo
|
expand
|
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index dee661e64a69..f8e9f566ef6a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4126,6 +4126,13 @@ static int __ext4_block_zero_page_range(handle_t *handle, return err; } +static int ext4_iomap_zero_range(struct inode *inode, + loff_t from, loff_t length) +{ + return iomap_zero_range(inode, from, length, NULL, + &ext4_iomap_buffered_read_ops); +} + /* * ext4_block_zero_page_range() zeros out a mapping of length 'length' * starting from file offset 'from'. The range to be zero'd must @@ -4151,6 +4158,8 @@ static int ext4_block_zero_page_range(handle_t *handle, if (IS_DAX(inode)) { return dax_zero_range(inode, from, length, NULL, &ext4_iomap_ops); + } else if (ext4_test_inode_state(inode, EXT4_STATE_BUFFERED_IOMAP)) { + return ext4_iomap_zero_range(inode, from, length); } return __ext4_block_zero_page_range(handle, mapping, from, length); }