Message ID | 20240410132818.2812377-18-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 15BEBCD11C2 for <linux-mm@archiver.kernel.org>; Wed, 10 Apr 2024 13:37:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8205B6B00A3; Wed, 10 Apr 2024 09:37:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CDB46B00A2; Wed, 10 Apr 2024 09:37:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 587286B00A4; Wed, 10 Apr 2024 09:37:05 -0400 (EDT) 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 3AFC36B00A1 for <linux-mm@kvack.org>; Wed, 10 Apr 2024 09:37:05 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 06C5C80693 for <linux-mm@kvack.org>; Wed, 10 Apr 2024 13:37:05 +0000 (UTC) X-FDA: 81993723210.27.F623FF0 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by imf21.hostedemail.com (Postfix) with ESMTP id C29D81C000A for <linux-mm@kvack.org>; Wed, 10 Apr 2024 13:37:02 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf21.hostedemail.com: domain of yi.zhang@huaweicloud.com designates 45.249.212.56 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=1712756223; 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=DHxnVt2eCkNob2fbYWCpZnvTmN8bZoEP4xQkUMxT9ko=; b=ilM/HVTpXEBO9TVP0nn/GccNrRHCoPt0ucUuMKUeNbm+houy2G9w+gZl4fS3uhT5JoHj+P c8K7O68Ny4wxh+IAu1qh49jADhvyBbs7NizylbMjf+VBA++akbQBhzin+hEruqi/KDkJO9 1ONgS9+Io2O/sVpQctTccfl3ZP7Vb00= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf21.hostedemail.com: domain of yi.zhang@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=yi.zhang@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712756223; a=rsa-sha256; cv=none; b=NcZgtBTdt6krASIQ0OA+bf9NmyN8jfTgc11Y9mB1j+Vh+9RItyZVqQ3/0TCWBSg7h8j2Im EUAxMdPA9171MpZ0Pm6BNhSGIc33yVgg11mW9cp+TtoPPoXCNHe3O0MdiCf8bg8oW5u2O6 v6HrM5ZEtOLEI5huRusVbf9KnN4oG5U= Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4VF3lR4Jqzz4f3kjJ for <linux-mm@kvack.org>; Wed, 10 Apr 2024 21:36:51 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 6F9EC1A058E for <linux-mm@kvack.org>; Wed, 10 Apr 2024 21:36:58 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgAn+RHolRZmeCl4Jg--.8806S21; Wed, 10 Apr 2024 21:36:58 +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 v4 17/34] ext4: use ext4_map_query_blocks() in ext4_map_blocks() Date: Wed, 10 Apr 2024 21:28:01 +0800 Message-Id: <20240410132818.2812377-18-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410132818.2812377-1-yi.zhang@huaweicloud.com> References: <20240410132818.2812377-1-yi.zhang@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgAn+RHolRZmeCl4Jg--.8806S21 X-Coremail-Antispam: 1UD129KBjvJXoWxJryxuryUKF13tF13AFy8AFb_yoW8Gry3p3 sxAryfCw1UWr1q9a1xtr48Zry8K3WUKrWqqrWxGr1rA345Crn3tF45tFyfAFWDKrZ7Xw1Y qFWrKry8C3yrGrDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPI14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI kIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2 z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F 4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq 3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7 IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4U M4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2 kIc2xKxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E 14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_GFv_WrylIx kGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW8JVW5JwCI42IY6xIIjxv20xvEc7CjxVAF wI0_Gr1j6F4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr 0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUA rcfUUUUU= X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ X-Rspamd-Queue-Id: C29D81C000A X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: wjgk6z331y6qcgawaembqoh69w1j3ism X-HE-Tag: 1712756222-495275 X-HE-Meta: U2FsdGVkX1/q5Ut25ek0MH/a5APaHe0JTAujoL6qeKQcRz6L7bzN7ckxXlXBk4J6uw5Qhda2smfsHiE8KswBHscSOI5mK0xXTFVuU65RnBw8Bcg/ukAm/GrP92GBAkbPcJ/hAKNK5+6cYlb1kfXERPjzD9z8Mm+7hKy/wgYXzU4RXBjFmI0iUOLu/wL11Dt0vZ3InrZEXu2qScdci5asog+qSPwFPwZQ/FGaQJqrtca8beIY800dkF5MJLCV0niFgDc3Dg0mHS1teurm3KQFyzuK7OjJ4HWNISl4+59A+WrwbmtoL7aEHQpynWNrcqCsbj1aGF86vwOBfy67ADhYF/tDckUPcZgdVKocZZbe3bQFPwxcuQw51YG/Nk9t073oC10EyC79qvAIUcpmHMKtZFGFfXUQhAHOMxt4UNq+dGVqZhMr7l+1LY2N8zlJoFA1GUjiNKHcDANGIEgRvGRNbzTwD6ay0dv7f5Lk+WSV4RmFjIr8h1+06lwu6SiPHhl+eZDgzu+nylf5B4vLzF1pSuBeEISxNAZ1kSmHPqZrefz79c01U0k9hp0C0EPUwdbk2SvlisP/3ZmsgJzDpfUea4uLR+rEc/31hTs6ULhxl8yERMDeuqFCfra+4MlqSHXE5NehuGbOmfsDk1enVnhcC7Fb7dDwO9y75iVrJ1yBgzICG66dTWQ+MLYH19rY0+0QVn/6tu1vfw3cmCJ+FYVSdQHMVAwuTAnD+MlB4UiMgMyG9t7btx31qwah4VctwriV0cFLEsP/hOJFkofrRpJ9ZdQEDNkrH65LgsxPJHZt38drTRoFblKW8UK2iI7AMc/6pF7+PjMz/2yT+G2kO4Jxuh7mRguzcHOSvKDM/z8JfwHRFOGWboVTIZPAayLxc1G2BG5V69fny9ylmQzN2nCUJX78ibDbHqvv0z/FJ1Buy7QVgHLCiNqFpbvem6Yb5H8XXB9fBD8R2TkEM+6fAFx +Ri/xfMT BJhRr 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 folio
|
expand
|
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 752fc0555dc0..64bdfa9e06b2 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -658,27 +658,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, * file system block. */ down_read(&EXT4_I(inode)->i_data_sem); - if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) { - retval = ext4_ext_map_blocks(handle, inode, map, 0); - } else { - retval = ext4_ind_map_blocks(handle, inode, map, 0); - } - if (retval > 0) { - unsigned int status; - - if (unlikely(retval != map->m_len)) { - ext4_warning(inode->i_sb, - "ES len assertion failed for inode " - "%lu: retval %d != map->m_len %d", - inode->i_ino, retval, map->m_len); - WARN_ON(1); - } - - status = map->m_flags & EXT4_MAP_UNWRITTEN ? - EXTENT_STATUS_UNWRITTEN : EXTENT_STATUS_WRITTEN; - ext4_es_insert_extent(inode, map->m_lblk, map->m_len, - map->m_pblk, status); - } + retval = ext4_map_query_blocks(handle, inode, map); up_read((&EXT4_I(inode)->i_data_sem)); found: