From patchwork Mon Jan 29 21:06:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13536395 Return-Path: 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 D9458C47DB3 for ; Mon, 29 Jan 2024 21:06:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 31EC96B0098; Mon, 29 Jan 2024 16:06:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1D38A6B009C; Mon, 29 Jan 2024 16:06:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 099386B0099; Mon, 29 Jan 2024 16:06:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id E2A816B0099 for ; Mon, 29 Jan 2024 16:06:52 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B5667160786 for ; Mon, 29 Jan 2024 21:06:52 +0000 (UTC) X-FDA: 81733583064.18.E93A9FD Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf11.hostedemail.com (Postfix) with ESMTP id 36EA340017 for ; Mon, 29 Jan 2024 21:06:51 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=ZWoyjvOU; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf11.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=1706562411; 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=dypInAl1n7QK+131yjCz8IF0LXkByyP7w+CtsaKfsNo=; b=JIN2VsU8GyuwMgqJANYDOtO0shXr2xL0/PLa5GwPr3368+P6J3VX3frRbwb9EM7+vSHlHv AJWRnRG88NJN/GstXIFGubsG1gIbG8AWcQbp7Lwd22WlSMk4/wqoJtCtGewN6bFQqzFSoE nfNS8c1pK9/4d3nBJ7ZrDW8V4g+zntA= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=ZWoyjvOU; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf11.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=1706562411; a=rsa-sha256; cv=none; b=CbQWgVQjjoXfk8Mz3xX3Q2JooLi3z6YUZY/2viA9zfYioSRhvWY5/80J9vSNBg3pdrW8Ob DPp7QLZo6YRX5GNAH8T6Uyu7bLhxmWgv9wsZXcA0kyt5k7svdPKfeidNDzF5TmTUEmsnuV oRyUuvvTm5JisgwRfcSu/Qm7a3WgLtM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706562410; bh=huTRzi08F0C7MipcdwWe4Ussu/u99HDe6usjofLClk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZWoyjvOUAKRorOkBf1VRCuUe3muZT9Jazkxz9NgPX6vA5tHzdv9fZAMvOwYQUQFS/ ykyGlVWSZVdQ0AmTeMSrDjJkEHWdN1z2Rkg+mdr/4zNt3mUu8G59Y1UA3dQ176ZmpR XNnmvuPAdpd+gxgklREaTW4KM1V+5TYa9+K78amLQzWaxBqWfXKQpPUZi200cIw2Ld Z3msxyPrO6jmtz8APzkLg3rQ9tiibW5MVa2+hL9owNVSrTbGjPvM2VkNg7OI3Jte1b FXwljb10nWNnW/XdQvOwCcgvrIynWSjuNs5CGDe0uL9fagDqdafBZW/LVhSU2RA7Ha tXwBGOdG23nsA== 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 4TP17t2bfzzVJ6; Mon, 29 Jan 2024 16:06:50 -0500 (EST) From: Mathieu Desnoyers To: Dan Williams , Vishal Verma , Dave Jiang Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Jan Kara , linux-ext4@vger.kernel.org, Andrew Morton , Linus Torvalds , linux-mm@kvack.org, linux-arch@vger.kernel.org, Matthew Wilcox , nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org Subject: [RFC PATCH 4/7] ext2: Use dax_is_supported() Date: Mon, 29 Jan 2024 16:06:28 -0500 Message-Id: <20240129210631.193493-5-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240129210631.193493-1-mathieu.desnoyers@efficios.com> References: <20240129210631.193493-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 36EA340017 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: ecikaht8o6m6b9cp9wttu8zw58qmedm8 X-HE-Tag: 1706562411-567289 X-HE-Meta: U2FsdGVkX1/B/RlXKtMci8tN1hDTTOoxePQoCBReqE+F078NfxothRpz0KBs/rc60PaxuvmIJX+bTHq0dsc3XxTeVyjtcCVnfZOS7m5d8+06j7rGZ7/HPfYu9b4Ph1veGHNG+3PAJHnet1tPjhJfOHGLtNnvukOffgg9fu2vWwb6jO03kf8W1/I0lcGpxtiu+Tp77skh/8sA4DH3Iqex1XJ6A+AekkeP0fAJyHSj1F2XJrv/Bx9X+lKEyjQwojEpliPGZIgNIJ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wBbIyQx+LkfrfalP0P1xd5Tf2+aKsF/EypP0vtt7+Gs/hXjT+B3ICftg5i0Nhkwfww5Pcx4HEfjXH8rhwkaRfYzVt0rIyT84mMAsWgKWa/U6v2m0JF3gwxrRoo8Wcrs2djRx5s6LoQY0ntrxPQvzf1f8ODNaNKj4Hb/ypZELo6M7nZS8SAUr4DXqj/CPEo/YM5l/clE6k6Dgb0vjZsIxB5I1yp22kL1RiAc+WznWd+ifRqad6jWvUy4gcSLrPmgPTL1eu2GdRpqUzGY5nFKMbubk= 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: List-Subscribe: List-Unsubscribe: Use dax_is_supported() to validate whether the architecture has virtually aliased caches at mount time. This is relevant for architectures which require a dynamic check to validate whether they have virtually aliased data caches (ARCH_HAS_CACHE_ALIASING_DYNAMIC=y). Fixes: d92576f1167c ("dax: does not work correctly with virtual aliasing caches") Signed-off-by: Mathieu Desnoyers Cc: Jan Kara Cc: linux-ext4@vger.kernel.org Cc: Andrew Morton Cc: Linus Torvalds Cc: linux-mm@kvack.org Cc: linux-arch@vger.kernel.org Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Matthew Wilcox Cc: nvdimm@lists.linux.dev Cc: linux-cxl@vger.kernel.org Acked-by: Jan Kara --- fs/ext2/super.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 01f9addc8b1f..0398e7a90eb6 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -585,13 +585,13 @@ static int parse_options(char *options, struct super_block *sb, set_opt(opts->s_mount_opt, XIP); fallthrough; case Opt_dax: -#ifdef CONFIG_FS_DAX - ext2_msg(sb, KERN_WARNING, - "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); - set_opt(opts->s_mount_opt, DAX); -#else - ext2_msg(sb, KERN_INFO, "dax option not supported"); -#endif + if (dax_is_supported()) { + ext2_msg(sb, KERN_WARNING, + "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); + set_opt(opts->s_mount_opt, DAX); + } else { + ext2_msg(sb, KERN_INFO, "dax option not supported"); + } break; #if defined(CONFIG_QUOTA)