Message ID | 20240410142948.2817554-29-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 9DE80CD1299 for <linux-mm@archiver.kernel.org>; Wed, 10 Apr 2024 14:39:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 92FC16B00B0; Wed, 10 Apr 2024 10:38:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8684F6B00B1; Wed, 10 Apr 2024 10:38:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7083E6B00B2; Wed, 10 Apr 2024 10:38:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 53DB96B00B0 for <linux-mm@kvack.org>; Wed, 10 Apr 2024 10:38:50 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 1AE44407CB for <linux-mm@kvack.org>; Wed, 10 Apr 2024 14:38:50 +0000 (UTC) X-FDA: 81993878820.19.24FFF7B Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf08.hostedemail.com (Postfix) with ESMTP id 17FF516000A for <linux-mm@kvack.org>; Wed, 10 Apr 2024 14:38:47 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.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=1712759928; 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=1rfO3bDUWjwaLs+wdCUIuN/1ZGWNGlnDZNmsSH0BvMA=; b=wYY9dj5x0n4YXWVcioJ4VwMSTGRWWGSWeCV4L9wya4NAUQ9dXLeCj2RJq0x/E7M65K2d+d DqzGHHwH+JGgire7wWnfpSMznvHPA7sHtS2mFuPrfxT0jOEahYyMdyvlwbsywwbGkDDRef qSwfeAi4z7Z+aoJoLhOnQSBJd0fPNQo= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.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=1712759928; a=rsa-sha256; cv=none; b=JD9xhVio19Lc+nKT3WT+TqGlQSbhQP/Ux0L1TL43pQpPZRqOdrBic1icrtvSibfR2PHJ4G 2gXEgz1Zs51vviWng5GWg1T2isU5SJzRoiOeLD7V/F1Kyu5RHvSL8fEbTNSMJ6D25asvkg yXj/FgSonlkv7fiX3DoWURh8ybWEP1k= Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4VF56h75Rsz4f3knR for <linux-mm@kvack.org>; Wed, 10 Apr 2024 22:38:36 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id D1FDD1A0E12 for <linux-mm@kvack.org>; Wed, 10 Apr 2024 22:38:43 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgAX6RFSpBZmcwR8Jg--.63000S32; Wed, 10 Apr 2024 22:38:43 +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, david@fromorbit.com, 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 28/34] ext4: writeback partial blocks before zeroing out range Date: Wed, 10 Apr 2024 22:29:42 +0800 Message-Id: <20240410142948.2817554-29-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410142948.2817554-1-yi.zhang@huaweicloud.com> References: <20240410142948.2817554-1-yi.zhang@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgAX6RFSpBZmcwR8Jg--.63000S32 X-Coremail-Antispam: 1UD129KBjvdXoW7JrW5Aw4UXw1DtFy5XF47Jwb_yoWkZrc_Xa 4rJr1kWrWftr92g3s7Cry3ArWIyw409r1fuFy0y3s5ZFy5Kws2k3s5Ar4xZrZ5WFy2gry3 Cr4qqF48WF9rujkaLaAFLSUrUUUU1b8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbl8FF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2 IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28E F7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJr0_Gc Wl84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1l n4kS14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F4 0Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC 6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI 8v6xkF7I0E8cxan2IY04v7MxkF7I0En4kS14v26r4a6rW5MxAIw28IcxkI7VAKI48JMxC2 0s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v26r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr 0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y0x0E wIxGrwCI42IY6xIIjxv20xvE14v26w1j6s0DMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWxJr 0_GcWlIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4UJVWxJr1l IxAIcVC2z280aVCY1x0267AKxVW0oVCq3bIYCTnIWIevJa73UjIFyTuYvjTRtOzsDUUUU X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 17FF516000A X-Stat-Signature: n7jxr4334e1jz1q8chedh6u793xzuhmi X-HE-Tag: 1712759927-362985 X-HE-Meta: U2FsdGVkX19X7814TPO6s3sh3QIWDjjiNVhUBILcSXNDdaDe9hO7LQUu1N+ItlzgT0xb/cnEG1lpiJp2hXnKiYv+Hlg4K5Lga6MbYtUQ/9/Shzi6k71fBqwaKVlRivnWzkjxVhFCOocWH7o9aLXoTwziSDej3Wv8MR8Z0dvOlew6jmI6uqIu+ULDkJJzooM2okKphKQb8BYL+USwxXCvdkVy4QnG+rvavGgtmXAiM8CRmRk733zDFw4YQXzNPQr2ALW8QZXiLu6pkMnpsvl1CWLkldL428fKVaw8NY7dhRk34qUq2Ey8CMrHX0vj+OYlEmOoxgJjTUR3bLXUwBswp+oHB0Ocky063Z3ntl4CtZFsZyMOr7wC0m31SkBy3TgcnMQMRywcuShB5nCm9aMaaJGtQni7nw3lSo2c8LV2KSW+Hm0+O8O8IY/1DlPsYARD7lp0GEjmPGRDL2xcRvkIkUy4+nkOxQobQ1rSgACWD7EGJtVV1trA0fER4U3svwLxxlGzcSH3WcYrT6BcKnnNlRlAp/QhJLSI/qfeN/C1cpvF7DtmCunoAeS8ZwZ4RfBKPbjQ2H6oVTfwvNDD5t0qZvflu4ookaaeahnu5YEhyzCMFDizINQcEBFc4xEL1XgrPVaiJWTQlQTuJ++Wy5gD/dnGzs8iC7JkVIzf0C3zGoPEbLvjwAg7uZ9FGfbtzgHwIKoYHV+tu7Nx0ozWB/soXwYqfIop6wt/PpuoAyG/bM3TJoNhebeN6EHgBvG9/2ZkzH1ksWLq+zLb5DLt8Wpay+uaDeFXYTJp4dTjlC8SqJBmGaFZXtpVW0HwM11VuAjubxNeIuODudG97lUhLNiKiGOlpjAcbQEFLJo5CR58DhB4UsrulCuff4f66Kr1XJN2qB6c5M9/7jXIIeohWenVvF6jmXyucgSMpiffheZzwGsyxXLiz2l2l3CQ8jocFFo27kGz8ekpaO6rjNsUcI+ oZLLtfPu Mr8q17T2HR0IsV4I= 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/extents.c b/fs/ext4/extents.c index 9849947cec56..c4c38a323ff7 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4580,6 +4580,15 @@ static long ext4_zero_range(struct file *file, loff_t offset, if (ret) goto out_mutex; + ret = filemap_write_and_wait_range(mapping, + round_down(offset, 1 << blkbits), offset); + if (ret) + goto out_mutex; + + ret = filemap_write_and_wait_range(mapping, offset + len, + round_up((offset + len), 1 << blkbits)); + if (ret) + goto out_mutex; } /* Zero range excluding the unaligned edges */