Message ID | 20240131162533.247710-2-mathieu.desnoyers@efficios.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 75A14C47258 for <linux-mm@archiver.kernel.org>; Wed, 31 Jan 2024 16:26:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A624F6B0093; Wed, 31 Jan 2024 11:25:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 928E46B0098; Wed, 31 Jan 2024 11:25:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 775086B0095; Wed, 31 Jan 2024 11:25:52 -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 3C5B28D0007 for <linux-mm@kvack.org>; Wed, 31 Jan 2024 11:25:52 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 21E5DC01F0 for <linux-mm@kvack.org>; Wed, 31 Jan 2024 16:25:52 +0000 (UTC) X-FDA: 81740132544.17.DD0215A Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf12.hostedemail.com (Postfix) with ESMTP id 70BDF40006 for <linux-mm@kvack.org>; Wed, 31 Jan 2024 16:25:49 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=EB06hVwq; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf12.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706718349; 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:dkim-signature; bh=Yt2CHrUIXOlD7LqPZ+/R1tzDg+XB4/CnMmFyvBmU2Ok=; b=2Ng1lXKFR9Z7Pzxs2U5B53hWzszofrJjEPBxNIVCILkLjWVygpoICMTQXhp4eLMOTUqTi/ cQDwaf3okeKXWYnEbcFW3N2QdTXYWqoRmqpDQO9wc0+08708iMbLE8A2fJIOyMBNu8RtU8 SWnDwlR6s6U5JW9kcvTtOqBajNQKpnc= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=EB06hVwq; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf12.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706718349; a=rsa-sha256; cv=none; b=KO/pq5tFBOsEcsB8tV1FVaicC8Gd+nQsWjS4EwxdYPEtA3cfdBk1KxwAka9uSPNb/mrd+n PJw0vUsETlvSBBdqg3c9FdR1MF3qQQz8zMloBPg6vn1HRd8UZAHRY8JyVOmxDDCrKhWYEt +Vrdj/1rTsIXqiu5RoG40Y81Q2Ftdr0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706718348; bh=CfmY1KnEab9DsMrJbyvT5LgUiqxfD1jYSIdakS3IZw0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EB06hVwqH30Biu+iJCPUcv/terkIISNlE4G2KLYR9OPO6YHERtB+CQuC+sUJ11GiS qanrhIUz9PaLQE+1Sfk0euf5aZEOnEh0ZmU+8GuZPFIs/dUfEpFpY4aR3hMNoQ0M4K YjYn8N+vE1erhhgi+WRevsbvvXyXBUbecJrhzvF+suEsrIh0Is3m8q7H9EX/5wMjZ9 p0E0sTMQLq4kN8hV//trJ3mjwoImjOLdvL5YGOOOSyKl//9q9lix/RG3EaWChntvIr cfkBAkZwRIFFgomMisFAqXV18H2U/8TgTzIZaM6+spiKRIWy+N1609kejZ5IMCInoX m8KJF4ssXA/MQ== Received: from thinkos.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TQ6ph0mWTzVnx; Wed, 31 Jan 2024 11:25:48 -0500 (EST) From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> To: Dan Williams <dan.j.williams@intel.com>, Arnd Bergmann <arnd@arndb.de>, Dave Chinner <david@fromorbit.com> Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Alasdair Kergon <agk@redhat.com>, Mike Snitzer <snitzer@kernel.org>, Mikulas Patocka <mpatocka@redhat.com>, dm-devel@lists.linux.dev, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, linux-mm@kvack.org, linux-arch@vger.kernel.org, Vishal Verma <vishal.l.verma@intel.com>, Dave Jiang <dave.jiang@intel.com>, Matthew Wilcox <willy@infradead.org>, Russell King <linux@armlinux.org.uk>, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [RFC PATCH v3 1/4] dm: Treat alloc_dax failure as non-fatal Date: Wed, 31 Jan 2024 11:25:30 -0500 Message-Id: <20240131162533.247710-2-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131162533.247710-1-mathieu.desnoyers@efficios.com> References: <20240131162533.247710-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 70BDF40006 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: rjn39jzwfr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O/q/9E9c6TS3wFcy/hhq7l+T9BIIUuCwAXz9C0Q6nKQ52tj21LYmHcwWXxIYqwn04u7tTaagQvPW5X98vAOOQfCbfFztyYNshthL243wCnC9/kMm5ffF5RgREG3vK67dGIbn+8kPSwobXzWPymFIYays12nuCO9Wp/DCHCaOVcF8nZkYrLi69+Ngo0d4ryhme+X0ErGLPUUu9zome+WcAdoHhmM5Hl5W0OSY7c7Vu2EXJaVV3b08LMtHlUysHq6bl6mJ3cnwd4NDJQY+BQJcmzs8007UoG826T17gFN3O416I5sD+EVY5oun/5VPhvmZCugUlMMlwFpNAScx123Y9xoTeRUDXimeV5X3PEy/Fcqa/G4luydqsMcAidpzNhmRS058SnnKgj6ZL0+Hqoy8Aimc2Ggt3kiB9Q4i4SKWM0i7tV5EqPsICQiLKoFpZxebmbClZ2+Otszq2sHD+XH7QzcmMh+IlgLPwMnhNkaOxU94jOqzwEhgRz64Aiw7VMHQVn2PVuvjWJhTF/vQ11+jn8gioET85hmW0ecrDk9L5uAxW6bGQCw2qhUoaqCmR++JjrgmEXv8sM/RyJ3kLmkay2WOID3RzsqVK6awAW6S9iXFW9YvoYpx0p3dJU7A= 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 |
Introduce cpu_dcache_is_aliasing() to fix DAX regression
|
expand
|
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 23c32cd1f1d8..f90743a94da9 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2126,12 +2126,12 @@ static struct mapped_device *alloc_dev(int minor) md->dax_dev = alloc_dax(md, &dm_dax_ops); if (IS_ERR(md->dax_dev)) { md->dax_dev = NULL; - goto bad; + } else { + set_dax_nocache(md->dax_dev); + set_dax_nomc(md->dax_dev); + if (dax_add_host(md->dax_dev, md->disk)) + goto bad; } - set_dax_nocache(md->dax_dev); - set_dax_nomc(md->dax_dev); - if (dax_add_host(md->dax_dev, md->disk)) - goto bad; } format_dev_t(md->name, MKDEV(_major, minor));
In preparation for checking whether the architecture has data cache aliasing within alloc_dax(), modify the error handling of dm alloc_dev() to treat alloc_dax() failure as non-fatal. Fixes: d92576f1167c ("dax: does not work correctly with virtual aliasing caches") Suggested-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Alasdair Kergon <agk@redhat.com> Cc: Mike Snitzer <snitzer@kernel.org> Cc: Mikulas Patocka <mpatocka@redhat.com> Cc: dm-devel@lists.linux.dev Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-mm@kvack.org Cc: linux-arch@vger.kernel.org Cc: Dan Williams <dan.j.williams@intel.com> Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <linux@armlinux.org.uk> Cc: nvdimm@lists.linux.dev Cc: linux-cxl@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org --- drivers/md/dm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)