Message ID | 20240129070934.3717659-10-wangkefeng.wang@huawei.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 BB9F4C47422 for <linux-mm@archiver.kernel.org>; Mon, 29 Jan 2024 07:10:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FEA46B009E; Mon, 29 Jan 2024 02:10:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 580426B009F; Mon, 29 Jan 2024 02:10:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29A656B009D; Mon, 29 Jan 2024 02:10:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id D99C46B009D for <linux-mm@kvack.org>; Mon, 29 Jan 2024 02:10:02 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id AB7A480770 for <linux-mm@kvack.org>; Mon, 29 Jan 2024 07:10:02 +0000 (UTC) X-FDA: 81731474244.24.9845CF1 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf15.hostedemail.com (Postfix) with ESMTP id CC812A0011; Mon, 29 Jan 2024 07:09:58 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706512200; a=rsa-sha256; cv=none; b=I8GBz6INqpyIgXjrDG3+tZNL/URTRS9zOaSPAvyQggNMvvOVxNy8Of4MybXCXKVU40dGZK CXP77MUFbBh5puyHRUk1eSc+IXSJ/o7w3RtZi67KRGZ63ugV7Kre0StFQT0dgx/8CoNnHM rSU8BqwMIzl3RF27ePdFGQkY4ipMpl4= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706512200; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T9l4uXaMIpiasxRBGjlvtFNrIlIizkyq4ptgkMIKZIg=; b=hlBD1ydt/aRILzaKBeDv29/Vmwj2aJauQVK9Qoe/2F71DveNgvOp7dI06vmoKC1I62nwF+ tMl6y7gEh2NJZI7Dhgxxib6s9ngF/4QBTkL0N9rZ2Jd5VodWa7T5Z3ZtwTpTKiBdom9Qg1 7RVkQfKqsJBHVdG+8/UE8HX+qCmCbK0= Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4TNfY16qdFzNlmb; Mon, 29 Jan 2024 15:08:53 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id 07984180079; Mon, 29 Jan 2024 15:09:52 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 29 Jan 2024 15:09:51 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org> CC: Tony Luck <tony.luck@intel.com>, Naoya Horiguchi <naoya.horiguchi@nec.com>, Miaohe Lin <linmiaohe@huawei.com>, Matthew Wilcox <willy@infradead.org>, David Hildenbrand <david@redhat.com>, Muchun Song <muchun.song@linux.dev>, Benjamin LaHaise <bcrl@kvack.org>, <jglisse@redhat.com>, <linux-aio@kvack.org>, <linux-fsdevel@vger.kernel.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH rfc 9/9] fs: aio: add explicit check for large folio in aio_migrate_folio() Date: Mon, 29 Jan 2024 15:09:34 +0800 Message-ID: <20240129070934.3717659-10-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240129070934.3717659-1-wangkefeng.wang@huawei.com> References: <20240129070934.3717659-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100001.china.huawei.com (7.185.36.93) X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: CC812A0011 X-Stat-Signature: p65w176pr9poy8apfa6d4cfxe5jgx9qz X-HE-Tag: 1706512198-709206 X-HE-Meta: U2FsdGVkX1/pezLuydLDpa25F1Zs1SHtOB0zxnRSapRE25Jw/zcE5GfU1Bt7ZH7ctsSXEsf7Yaocysaq4vGbm2YoiwbSrM2mIEHeyGLW+nLoA/SAQpy5kQ+Qc3Q4EBa18UbNMfPziE/KRrm8RvNiwQfH/N9hgahhboooC1x7SWA40RTvp2dy8JmtLpKzsrQ93koQeTLWbNI/B7pyRSLSmsiK6mBy60hSNFFG/9ESIoW/2tLOiC0cc3OHA5nwY1lZ1Boe63tSpIG5dT+WqUcoKb+FZjzE3BssLWfwHtFkNyqMQx5fv/MdSiZFKHCrNrBkPsTxyYfAnwdgRCTdizcQuGqiI2L9u5tUs3BbeM7sfimxRZ1Ho0Xnhr9RtsY48eB6XMP7uQHFJGl3xeHg/KFjB8QaR7p/YFV7IzFtWA9+7t67oUYgYV0N5oGaTH1cKgGAMUNiSjFmBnw+5PiivMynYoqAdFdny8qHZobMe1ls7rN9TT4Ag3n8icz8TRtO7yMmYnS3aJR5E72kTok8sA78U4tx2/PD/LOV5nyjnKn3m0OtvWRw1wPclYyI6VPXlGZkeoX17RiyE8f0u7gJ5l9OyIv/H1ZJ0TYEudRUBIpeg8Wn46kaIsvw2LQF26n29X0PLDBldYNfAMWFXIqqHnMlyyuRRptJOTjkb2S5E+/Mev/g56iu/nZMQam8v/6O6GpWyEcOSK+sdUED8/EcqG+cqg/I5hqK0jigBkOJqbICXkI5CpUDahFIJnAD7jQhtqDofoJ4UdXf2iQ0teAyDBKy1KPKzNswRx6/z4iyiuEgFjDwaMTQJcXFgiUGOjqYtJPhQm96BsQxBW89qpgXgjbXyqQjd/Hxjnf1p4AyYKcohgC2k0nLNP0Zjnz84AL8jTSosmmi3Vy3G+2b2yTlUvC1PdWLj2TAWoyYFTTsyN9bJNlsIHUflh3xPiFC626u/WhxohXUzm8+V+NCzQHXYHx Kn34KTKu K0r7zz9EsmNQu8PR1+mL1gZ6cTyR23ALAO0dM5WdsQGs61fFum03dGYhTn3PGyiZ9i+RrKHvKoGWIQPUI19dDbVyWfnfu07n3IBSAGdYXbxrK8ynn8XzwZ4ehQh2Ydq6Dhk/kaxSwiEuAp8C64i1qGCrmFIrGNFmKK9+EcGeYbtJ5kMQ1SjKNooYjExfg0n+qhJQc 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 |
mm: migrate: support poison recover from migrate folio
|
expand
|
diff --git a/fs/aio.c b/fs/aio.c index 631e83eee5a1..372f22b85b11 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -411,6 +411,10 @@ static int aio_migrate_folio(struct address_space *mapping, struct folio *dst, pgoff_t idx; int rc = 0; + /* Large folio aren't supported */ + if (folio_test_large(src)) + return -EINVAL; + /* mapping->i_private_lock here protects against the kioctx teardown. */ spin_lock(&mapping->i_private_lock); ctx = mapping->i_private_data;
Since large folio copy could spend lots of time and it is involved with a cond_resched(), the aio couldn't support migrate large folio as it takes a spin lock when folio copy, add explicit check for large folio and return err directly. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- fs/aio.c | 4 ++++ 1 file changed, 4 insertions(+)