Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp634272rdb; Mon, 29 Jan 2024 13:07:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrCaMa63LFVcBaZdm+2+NcQUKQ25qzmIfQeiNHFUj/0EzKI1mlNVq9CH+QhPHJIPOII+3d X-Received: by 2002:a17:906:298d:b0:a30:69d4:3047 with SMTP id x13-20020a170906298d00b00a3069d43047mr5629120eje.8.1706562433860; Mon, 29 Jan 2024 13:07:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706562433; cv=pass; d=google.com; s=arc-20160816; b=reIis9+0Sz/kLn01R0h6iIaPNUYxELCGN0XY98MMO53HQOrwukxEwlJn9TolmbfF5P Zvqk0e2xKm7C5lqmWrot7XCphc/Rl2u7P9OYHf9eHJtP58wV6PV3+cAvkwehYyMK4ETC SMfUjuoCErLwIMClWAiB//KpS2P9F95DpnNf/Aqv7YzRZdDIFuogDR8lul05Q++X62cJ WRrG7pJkZXAC+5U7nMxZagteyQwAR+MSaNlbTgmNzweJJCCKcA9n6AqhYtmlCzxmOUwp Cnd5Gjc9reeOhZvJamrQyVGs5i2Au8rGpfAJlkaoNAZZchtaDhkIgnRQYeXOLyofG9Uw AxYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dypInAl1n7QK+131yjCz8IF0LXkByyP7w+CtsaKfsNo=; fh=zuGQkOnDZxSqtiyoxGAQvPjLn1yWOr6hcW+FgiTiIlM=; b=Ykbd7wAGr1/X+IHbX+JJhseedAyptyo5LeueMPEIu5jQo0g9Xk0xiHwZZ/G/g7jMuY pJt1xkMNgZTD/C/L/hifRMUU7M8sEr/ZturuuZuor9WOpJvB0mhpLWUAmbAP3rwJO2SZ ynlb2ciNe7jIRSLxZqNnd+muJz+DdrkqSmyqkUZXHp5Ne25D7X6LnT5DI4OlohPUcDCv zFkfuEOFTtTMzQKjCXsE5V+ZzHHaTjFr+j9YqlLUUDJCa+yYVFfHYvhhqgmK96kPe8ra +37Ic18VtxKTi4pXry4kWPfOeJyZaNha5lPJRev68vbKg2WS5/sYKrRfho4EiqcWD5D/ aBPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=ZWoyjvOU; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-43501-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h8-20020a17090619c800b00a34a1ab1039si3751146ejd.966.2024.01.29.13.07.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 13:07:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43501-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=ZWoyjvOU; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-43501-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9E80F1F2572E for ; Mon, 29 Jan 2024 21:07:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9ACA315956A; Mon, 29 Jan 2024 21:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="ZWoyjvOU" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 741DA157E72; Mon, 29 Jan 2024 21:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706562413; cv=none; b=YirjOv4koDJYCbaNhyahLl5OyNVwpE0JxG59e/nGE7NYIspQdxR5pPCMbGhf7BLpeEXxNSWgQ2uJ2SF4GvkrX3sq7s9fkaLl3XxToDEAz0Jrbau0Aquyrc2ulSPspWo4MKLC9rcqY//skr9db9ccrjIrgXhaJ8xSRAJypwW0t9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706562413; c=relaxed/simple; bh=huTRzi08F0C7MipcdwWe4Ussu/u99HDe6usjofLClk8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pdH8ZxBjF459CKT+NL7owV6R+YPjRHYFgdT8WO2mtfqEfDccKE36H44qqCmfxDtCyCmZA+Y5UjJ2FL1hsm9yKYG+IVnnSPtZkv3Exlb0L/xEzIfxfHihj+xNUgc1YqDbNYc9hGvIJiG8GBezDnHSNIG3zkB5IdgvhOa0mmccfBE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=ZWoyjvOU; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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) -- 2.39.2