From patchwork Tue Jan 30 16:52:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13537745 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 AD104C46CD2 for ; Tue, 30 Jan 2024 16:53:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5EF486B00A4; Tue, 30 Jan 2024 11:53:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 59E006B00A7; Tue, 30 Jan 2024 11:53:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26AEF6B00A4; Tue, 30 Jan 2024 11:53:08 -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 DF6DE6B00A6 for ; Tue, 30 Jan 2024 11:53:07 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id A105F809A1 for ; Tue, 30 Jan 2024 16:53:07 +0000 (UTC) X-FDA: 81736572414.26.3AEB614 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf28.hostedemail.com (Postfix) with ESMTP id 16D4BC0013 for ; Tue, 30 Jan 2024 16:53:05 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=bihVHjMT; spf=pass (imf28.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706633586; 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=SUrs+a+seJwqRojpbljVvvOfD+UCI3GAhDJI94PFAUk=; b=NGP1lDvy1JABt9VOMDA25/cRPGfynud5FOF+Bs6IMFAYvT55UUGqtaZWcHRFcRd30tjpmm prjvmhIsc/qYiy36bpZXFv40r4xLinSn0RVkk/znahHBlotyCvjYIJChT1mQjDTwgBCMjz 2wSCRu2MMM9GAOrPqy4ncWuN8D+8ahk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706633586; a=rsa-sha256; cv=none; b=5j2qfcXUUAVzs8APJLyCx4JUi26L16roISWHbIp4tbsXVKQLnpTnJUYRyYTFZvLAJ4vdPf RDEafS2J6s4RcLyD773D+CLxtnIes3/f6YD8Wo5h9rLb5AxOyxe2DM3DfmwfkdmzAs7FAH rHfHuwXXT4DDeC6YU4elvb9eksRkdtY= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=bihVHjMT; spf=pass (imf28.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=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> MIME-Version: 1.0 X-Stat-Signature: ycfeiagj3pughmdqymhijaogx1h1njaq X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 16D4BC0013 X-Rspam-User: X-HE-Tag: 1706633585-419145 X-HE-Meta: U2FsdGVkX183MI/3gLTibyPNdsAIStLHLMWSKZBX7qiMuMPsLQfiyl+QzfhLODw2MnpPEXEZa8F0/6CadPxYR3fkH7/Wc5tmmHleLDIODRQ0baozuxdffVEYh0hYABlabIxx5UJWsU+QZLCbieeIyccYXMhGDD4WLat4ocnxON88RWG9vsbGUJf9LQuukyPTpa5LG/MNGBiQDr7RQlJh94dbGcJFz2cGpAoOyG4r4VKwn0DGa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+yapjT3FaJ7SrXic2st6LSODY03jL5njpTkZM2EcAtr2+UyuHIcq4eh5Q56581hQ9OCiIrWBBdFksZaM8qUe6mb96J47oDshQIzhvTEgX3RvqruVT71uuGa9e9zccc2sz/F2nMBg7tjriIGKkPqxxDH1L6tUVhLAz/b5zLPD1+z5qjRWeQ8gEllApPhw67k2vxhNUeTcHbNv10vsPfoDJ71eTQAAbEnGCoXkIH6yt+CY88z0Dk14FWLo39kNMUDBkiK0i/Wcgq9ViDMxdg8jcxhGQWhjlvnD75/9UUF8AZ+vCMc97WyIERrJDBc4QHCRDSnv+rG2c= 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 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;