Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1137340rdb; Tue, 30 Jan 2024 08:56:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGen20Uwvxn+AVdK4TnxmEJ1F70VpkTfc+pCutf0hklHHAz4NgZ2wfBnjHFtJb1aDOBc+f8 X-Received: by 2002:a05:6870:56a6:b0:212:42f4:82f4 with SMTP id p38-20020a05687056a600b0021242f482f4mr10194740oao.4.1706633779960; Tue, 30 Jan 2024 08:56:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706633779; cv=pass; d=google.com; s=arc-20160816; b=jCOEr8k2+Adwb9AqdsGtvgiD5Tcnea1L37V+iJ7PsURRf9IFi/pLrSyWYB4pxj5XiD kCZ7mtJ6q1lG1A4tbEN5b83IHnZIjOJbZsSBo1pAkJeE2xkI8q6PUH3unGgUp0BdDRYJ wIUc4OFT7siu3JAa4+yO47dXbdczg1Yk/suNcXqxvP1TWAYUEdMT7M8FZUsL+7DOrjhZ vqjNXh6QoKJzE9PA5isft5YWw9A09Lyf+iwe81UUltHEHpJUW4/Lh4rOC2RkTh4gkFeT dFEPWMHnJcsWl9q8PeOrarnQ50HKg2SilgJsxwqMrkoo55s7djJOrMdv0Eig2yEHFtup gYYg== 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=SUrs+a+seJwqRojpbljVvvOfD+UCI3GAhDJI94PFAUk=; fh=Cpy6WzS8ObYkMU0kAU/gb6LsOH9C4sxRhzUdpEzhw5w=; b=iKr0TSPyx+qBbdqP4C3C47TG1KAeUMSqs08nK7f1S6lsavagr22bB/DUMtKVrMiLSG 5Y/UhGHx1Q7LaKrAdIJxWIt6Ll7w88hdrgc5W3QfDr9Pg64H7WZB0CgXrDz2wbp/du/i T+q0xexnVNRxyxqrPUO9Qo1yB9KVlRWsO8sUDkunnBvBbeZlr0c/jHC45gafMl0Nj8di YAkRafPWCNPmJzLL8GF1cC+eZv3bh7b5qom2WGO2bcnjD8E1K7W0MiMUHC7b1Beht7kE pANIvT9/9PVGNvkGImjWFDi9PYGVvpI8bAJsee4noud9O8iCQmwa+/Qq2BwzVJN//0qa FfFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=bihVHjMT; 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-44996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s184-20020a632cc1000000b005ca5616facesi7574791pgs.38.2024.01.30.08.56.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 08:56:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=bihVHjMT; 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-44996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44996-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D7DD9287774 for ; Tue, 30 Jan 2024 16:55:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C010F12F5B0; Tue, 30 Jan 2024 16:53:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="bihVHjMT" 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 4BCAB129A89; Tue, 30 Jan 2024 16:53:12 +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=1706633594; cv=none; b=GENgjf0gZPzjflJeYNtq+6X6GKszPhnstLI/ecsNKP4PpStlTpFSlAM7WIt0xj+DtcTvyDx+lVmwzg2M88WIb6pf7Y0EL47gtPtCMHDOpUgFjn3uRH+U5j45/Tmcvjf6sG51gPWzCPSeZZzT0fTKG7NY3CRJ+WGV/ZafyC4+cys= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706633594; c=relaxed/simple; bh=4g9gvr2zRDJKqqYI0mUySJAzztyEKM8oIoATdWwyg7Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eeVMBp3/dLJK6qv0ITDJrhLvyrEuxMyBKNIJaztUJIRlfT1v4q7CV8IQkirh4UABq0lliwhuy3Az+d0NV4uc69zHR/zawOVAFlhSITuJbLOvOL8Cp27nyalgotMpU66gbY+Rs1CVIDzNa5tfLQ9Rc7FPxd2vgmJoCv8Y1F093bQ= 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=bihVHjMT; 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=1706633584; bh=4g9gvr2zRDJKqqYI0mUySJAzztyEKM8oIoATdWwyg7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bihVHjMT8e4Ue70q8Z3rvXqCi80gjbTnxicO3gxmMDeC0vxcZR8yP9+fyJ60aDdvP ZtH4Pl0qqOiXSzGsu372Hho4/PFKWCmQ/ZynIysaQqFioxW895NY9ZquW4AKykzHS+ dXa+jzGs49fy0IlxhrTtJEYeYGP8KdB6hWuNHrSgpZ394PbhBgU+SC44d+s6lxIKiv xp4IyzKVfSbh8zD8n/wWr6HDAgtd8aNpc2E5rpc/ONXK+2DS67hV2tArXqF/9NqGyn 5zcr0Ec3hXOJ/iQSANYw8xp/neByDUFebT1ybnHZOpWkPtKYp3zEucDjWFCDl7+Mkf hTksPwIfbI8nA== 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 4TPWSc3G2mzVgL; Tue, 30 Jan 2024 11:53:04 -0500 (EST) From: Mathieu Desnoyers To: Dan Williams , Vishal Verma , Dave Jiang Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Chandan Babu R , "Darrick J . Wong" , linux-xfs@vger.kernel.org, Andrew Morton , Linus Torvalds , linux-mm@kvack.org, linux-arch@vger.kernel.org, Matthew Wilcox , Arnd Bergmann , Russell King , nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org Subject: [RFC PATCH v2 6/8] xfs: Use dax_is_supported() Date: Tue, 30 Jan 2024 11:52:53 -0500 Message-Id: <20240130165255.212591-7-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130165255.212591-1-mathieu.desnoyers@efficios.com> References: <20240130165255.212591-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 data caches at mount time. Silently disable DAX if dax=always is requested as a mount option on an architecture which does not support DAX. This is relevant for architectures which require a dynamic check to validate whether they have virtually aliased data caches. Fixes: d92576f1167c ("dax: does not work correctly with virtual aliasing caches") Signed-off-by: Mathieu Desnoyers Cc: Chandan Babu R Cc: Darrick J. Wong Cc: linux-xfs@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: Arnd Bergmann Cc: Russell King Cc: nvdimm@lists.linux.dev Cc: linux-cxl@vger.kernel.org --- fs/xfs/xfs_iops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index a0d77f5f512e..360f640159b0 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -1208,7 +1208,7 @@ static bool xfs_inode_should_enable_dax( struct xfs_inode *ip) { - if (!IS_ENABLED(CONFIG_FS_DAX)) + if (!dax_is_supported()) return false; if (xfs_has_dax_never(ip->i_mount)) return false; -- 2.39.2