Message ID | 20240130165255.212591-5-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 6A953C46CD2 for <linux-mm@archiver.kernel.org>; Tue, 30 Jan 2024 16:53:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CCBEE6B00A2; Tue, 30 Jan 2024 11:53:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C550C6B00A3; Tue, 30 Jan 2024 11:53:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D1D76B00A2; Tue, 30 Jan 2024 11:53:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 78A7B6B00A3 for <linux-mm@kvack.org>; Tue, 30 Jan 2024 11:53:07 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5890B12018E for <linux-mm@kvack.org>; Tue, 30 Jan 2024 16:53:07 +0000 (UTC) X-FDA: 81736572414.24.FC49812 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf13.hostedemail.com (Postfix) with ESMTP id BA7BD20011 for <linux-mm@kvack.org>; Tue, 30 Jan 2024 16:53:04 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=tq2gAYC6; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf13.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=1706633584; 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=tk/vyFkTLiQku0ad9N/cHEV2e4n++1obKWF1GV2oX+Y=; b=4uTVLNtL+6DKeciTEcNYoQlKscbI0bEI9ee4tMvyDq0CoDVb0FtUszlCT85AMUFSs1HWLH 9krn6rTLTistq6+LRxzGqkSsX8MA0zsBJv2gZIaTgXx9RvUfR1frdbLuwQys0mnIMDws/W HvRHVPQsl63zi5k9YvclsfE5dpzuTMo= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=tq2gAYC6; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf13.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=1706633584; a=rsa-sha256; cv=none; b=BXfCRhsOolnK197nWnlMryzd+D6qp/A9KyA0madZyWcKCMBnhUpV2skVDDj3NJMhR1qFbS zEeLM20qaFDA16p9MUwPWJfzEOG3tvWmpCa3dZOQ6Z1QqMxHCDs0FDxkvX0iuzZW+VEu32 pM9+p/XRb5Vj+DjvwAyxUl3VMGg0Ghg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706633584; bh=x2kfVQnd3mtJ56l0EVkgCvgLcCn8XobB6WTDFgooC9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tq2gAYC66u0pgRQLdwQulg5tni9ICP4HQV5hNkD1Cq/9tUIG4HFmibZjHYT0d82Lp cMicqUnPpJnkA5r9jAw2IGJZq1ai49+03rBKiMvJ7+EVVJ3fomY/mGR2UbdmuwD82g 4P1KAEd/fHlBxO4l/WrPaUDLeudpg4vY9nwVSw2A4WctYupqUoslr+z8KBr5VnR1kC PZkebcd46BiUcXGPvLNjvaSeP0AjrYoRbx+QE9XFaoZGhkh7hav+ThwGlx6jS15Qp1 +KKuZLU3CDCOUFn6SKF6TtjyMsTWQ3wPrQ6S5XpGbBt0rNU6SjpdQh2odtFvPnz/1l Gdx4KC/aBtZhQ== 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 4TPWSb5HlgzVcs; Tue, 30 Jan 2024 11:53:03 -0500 (EST) From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> To: Dan Williams <dan.j.williams@intel.com>, Vishal Verma <vishal.l.verma@intel.com>, Dave Jiang <dave.jiang@intel.com> Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, "Theodore Ts'o" <tytso@mit.edu>, Andreas Dilger <adilger.kernel@dilger.ca>, linux-ext4@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, linux-mm@kvack.org, linux-arch@vger.kernel.org, Matthew Wilcox <willy@infradead.org>, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [RFC PATCH v2 4/8] ext4: Use dax_is_supported() Date: Tue, 30 Jan 2024 11:52:51 -0500 Message-Id: <20240130165255.212591-5-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 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BA7BD20011 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: i7ipmyr8p64eks4p96y7obtyaajhmbun X-HE-Tag: 1706633584-938487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b1bskwq5vokVoMs0WboHdnYFSPB0nijAPR/9VrnE1mzEGpM00MkZglPiLmfPQhp4+yQqg/NZOmSSiaTOaHCBAzKoUR3YzT5dKTDxMypCi7UCjUpp02/ssXwmyMTwlua2AQxpujEWVIyv+iANCGn92197bx1hGSPR4Bc629f/Ony3+RJ1PdqQxtD7VX1JIZzdQip/fQTQmyn4z9Iz0QNBtKucHPDng9Z7s7VxripLgOiprzygQFLNlQx8DTURjekkUVPg8dD/MRaKrKzMUm0kUoCZGUMn5me38mldpmsMzJRXgOtr6pIwnoikfCb2dSUQrYwxryEfftodfUWF7eEzJvzFpqdeRUIF7JQF1DOIs/I/gs8A3RarXFYE9CpiEJZ+jGGvLlxnpccbyFteq7BAE8zZypU2a1aBXo3qbaw/+BIhzWIvIKQrl1+yaox4Bb0tIYzn+OWCM71r1flJVfslzaUrkoRL9ueeN7aZqFX453+zrH0s/t1iQsr2QFX5LBGqA+5Opb0p4qNV9fHRy54wJ3kIejpzLDlMqUippKuwaPnfOwYziWV5sJaipGh1QVCbHaum5jRoysqP2AYSMuwHPr5RLoKRjwyVdg+k= 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 dcache_is_aliasing() to fix DAX regression
|
expand
|
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index c5fcf377ab1f..f2c11ae3ec29 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4743,7 +4743,10 @@ static int ext4_check_feature_compatibility(struct super_block *sb, } if (sbi->s_mount_opt & EXT4_MOUNT_DAX_ALWAYS) { - if (ext4_has_feature_inline_data(sb)) { + if (!dax_is_supported()) { + ext4_msg(sb, KERN_ERR, "DAX unsupported by architecture."); + return -EINVAL; + } else if (ext4_has_feature_inline_data(sb)) { ext4_msg(sb, KERN_ERR, "Cannot use DAX on a filesystem" " that may contain inline data"); return -EINVAL;
Use dax_is_supported() to validate whether the architecture has virtually aliased data caches at mount time. Mount fails 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 <mathieu.desnoyers@efficios.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: linux-ext4@vger.kernel.org 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 --- fs/ext4/super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)