Message ID | 20240129210631.193493-4-mathieu.desnoyers@efficios.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-43503-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp833502dyb; Mon, 29 Jan 2024 13:09:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHsErV3wRTQvcPvA/1ZrWIR2R2kXgIO4ayADvU1Mr3IFWBtiI/XrzKC9G5sicQKBLa/mMqA X-Received: by 2002:a05:6358:5604:b0:176:cc70:3eb9 with SMTP id b4-20020a056358560400b00176cc703eb9mr7049479rwf.39.1706562560818; Mon, 29 Jan 2024 13:09:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706562560; cv=pass; d=google.com; s=arc-20160816; b=vgKcq39i6Zq0e/U0s+vrsv9ee58jsvyP8xdMbmJoU/o0nREZG733qzkmKb6RehbMvp +SDCluopDG3ImZGR9DJuNVaypqrXmKqaOmETNmT4C5PqFzRUdU3A4CnoJ3TX2ZQim1Ir Y90S5jDnl9+NkgJlnfkGT1VV8jeq44gAoGIDPHvey24Dpisbd/5/iDuVt7IkrLGexgXO 1twz/UrqrEzBf/rNkHcy4GOjTMaxg7HOAcTPsmPx9zqAh8J2Og3+7HKa+2pzjswRq5wX ZFcSiq00sgsXp4c5/aEIcmZC8XV54HGC/UFMYHLuOY6pZvhsIm9Rm3FRHFeLAMPjRQLG X3eA== 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=mfWIaSpCcPWqZBxniokIPkYJb2xdS5Fuw1IXd4cGGKg=; fh=CnG4FQZauYwsz1LYew28BcNgjFRWgEP0GK0xWRZJKJI=; b=mpB05u9stCoaH50pshmcOwZw3k6u3yAyqd5pF/zG5ZTIYAyPnzngh3DPi8Bv0N6xcn NelSzvc1g8hG9g24IfISCNZfX+f40gVy8n8UVzy3CpWozSE1sUdFvJ4vaO1ZZoWnV5mk NygIfOLAfhqMVX1wnqQhfPCDBJlQitBxjtOQY+BYf8EQksEhSWQUFbTgXTING+h7fXZI B8DOVg2rgJXc5xFZrugJP2Qp76wpYh3PmYeFLXQ6akYnABWmXcgyhLdL9GYIZ/MCk6mZ xMmrPRW2sI84L1iVLPREhPzw1OQxOqZa4RaDTbj82+09ZHdi1cZpCqd8XgR3dbbuPW3V 0BSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=owLk9BdI; 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-43503-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43503-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k66-20020a632445000000b005d495d050casi6296346pgk.142.2024.01.29.13.09.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 13:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43503-ouuuleilei=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=owLk9BdI; 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-43503-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43503-ouuuleilei=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 608EE28394B for <ouuuleilei@gmail.com>; Mon, 29 Jan 2024 21:08:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFE95159571; Mon, 29 Jan 2024 21:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="owLk9BdI" 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 7414E157E6B; 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=1706562414; cv=none; b=MS04Od4uN/RQDvvWyXSiiqfCY76L9IAy4Hvrag4buao6piROzQjDpR+4ZwihgwrbmZAm/K0KBGBk2z42jXCytSmLkgm0zmrMrmUlt1gUdNLVmf6z1mGHA0q8nT0fUxt52J1JOiSzrZG3XrL01yOYHWQbFv0AyzIwHJ8SjCgb8Yk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706562414; c=relaxed/simple; bh=/LtPwfaY3uvi/uQueiJk5XQ5+25aOGLyhq5zZA6ahe8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=j4LQ1rgd+V9cv+w2y4ZjJV2BGML+eS+PH4/5ihGAozRF7aYM0Wntlqe7lnNpIfBsTxpN4cZq973EvohnDGshOkYYNgUUfs7EpWnQXQ0c5r8wj8cu1oLoQjqNyxbxP5YvTrHuZJsyC3+gZAAbBu+HuoIBFiL9IjwP/TmmRP3sv60= 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=owLk9BdI; 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=/LtPwfaY3uvi/uQueiJk5XQ5+25aOGLyhq5zZA6ahe8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=owLk9BdIvYMqzPMeQbF2d7yNSH3zTkRUuREg1aXHoA5/oKPsRDPqPidgGmIGg+ZMe uDiNO1/hYtcLl6AbcYMjONTAvJEsm6nwxQqyLcdJ/rEInjNK7h/7xuu18NXQG94k5M nDpyHDrTa9Es9c9pzOQ+TFHsELADk92a4djW5vooUTinmDn2l9YfYZTRGedTlpDb1b MI3xshUjIJfHBa1pLt/SmgLF6goBo2TIOsc/su8NScSwzwbLdoBVSgvIlqpOTOOubM FokMDNIjPddKGnlVW51N6DyLGp3GD1P7ThIgTTI/7EBNQcDz6UZ9lqZkBEx0WblNU7 uTSeb4zKuNrPw== 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 4TP17t029YzVXW; Mon, 29 Jan 2024 16:06:49 -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>, Gao Xiang <xiang@kernel.org>, Chao Yu <chao@kernel.org>, Yue Hu <huyue2@coolpad.com>, Jeffle Xu <jefflexu@linux.alibaba.com>, linux-erofs@lists.ozlabs.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>, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org Subject: [RFC PATCH 3/7] erofs: Use dax_is_supported() Date: Mon, 29 Jan 2024 16:06:27 -0500 Message-Id: <20240129210631.193493-4-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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789460543754613362 X-GMAIL-MSGID: 1789460543754613362 |
Series |
Introduce cache_is_aliasing() to fix DAX regression
|
|
Commit Message
Mathieu Desnoyers
Jan. 29, 2024, 9:06 p.m. UTC
Use dax_is_supported() to validate whether the architecture has
virtually aliased data 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 <mathieu.desnoyers@efficios.com>
Cc: Gao Xiang <xiang@kernel.org>
Cc: Chao Yu <chao@kernel.org>
Cc: Yue Hu <huyue2@coolpad.com>
Cc: Jeffle Xu <jefflexu@linux.alibaba.com>
Cc: linux-erofs@lists.ozlabs.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: nvdimm@lists.linux.dev
Cc: linux-cxl@vger.kernel.org
---
fs/erofs/super.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 3789d6224513..bd88221f1ad7 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -419,9 +419,13 @@ static const struct fs_parameter_spec erofs_fs_parameters[] = { static bool erofs_fc_set_dax_mode(struct fs_context *fc, unsigned int mode) { -#ifdef CONFIG_FS_DAX struct erofs_fs_context *ctx = fc->fs_private; + if (!dax_is_supported()) { + errorfc(fc, "dax options not supported"); + return false; + } + switch (mode) { case EROFS_MOUNT_DAX_ALWAYS: warnfc(fc, "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); @@ -436,10 +440,6 @@ static bool erofs_fc_set_dax_mode(struct fs_context *fc, unsigned int mode) DBG_BUGON(1); return false; } -#else - errorfc(fc, "dax options not supported"); - return false; -#endif } static int erofs_fc_parse_param(struct fs_context *fc,