Message ID | 20240212163101.19614-5-mathieu.desnoyers@efficios.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-61982-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp32934dyb; Mon, 12 Feb 2024 08:38:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU3kj3jY12LRdvwyqh1epzJz+rERGXUHkvutQpIJyxj1E0bUyWIp5n4VagWyKdB4rdGL11VU4xc1h8nPvrpoIXqwV/NdQ== X-Google-Smtp-Source: AGHT+IEyr45aOZdQAPJZfs6prDXsTcC6/lB+nUsUSqSwh+I+2WgWyf/FzfmPj6ROybT3Cdrh62D+ X-Received: by 2002:a05:6a00:1494:b0:6e0:d4c8:28e with SMTP id v20-20020a056a00149400b006e0d4c8028emr4678672pfu.29.1707755935306; Mon, 12 Feb 2024 08:38:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707755935; cv=pass; d=google.com; s=arc-20160816; b=owjtuDKJZV4wKxO9X/8XNKD3xjvU115LAxQnDrffbdtSn0N9jSjqk2QZ/UJrc+hbBp SQFjRKQrp4TN09xHoeqK7ORzRJxZnSjKD/zB4aM4iQOpXKqg6dauFJofxVgftwlfMDK3 Ix+Tvy8bZ7Y8Ii0zI9b8KMh5m6VyvKI1CdnAIDblAy3o+MtcERbjwKLjPerEHAQRHlwL GoLzOsEPU8XOnuCvKe9u/f0FqhNZ2YedJJv5rGD350K6m7SXEi2zBBTvOphkL2zvV2k+ 0pphFHPbUPPJw75OPk3808KwSRV87f5EkxMREp7PNgAubsOhhsUp9e8hRF1MAcT+siIt YSgw== 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=gKli+dHZYbYl5NcIKVupWlrpR3NX93t10pIkv+yAmpY=; fh=xWtsFSY+l7pV/zETdoReEh8gxKG27Aj2i4mHat66vME=; b=tWEU3N08gBbtYPR940iF5W1YZwvB6QgDVOGeL2EQY9ptSh3qqg5XJW9mZ4dPSp0FRO B5oajgUtkJ3hU4SeNjJS6k+aBMWqimxp6ufrXGRK6Smt2n3jkvoUmxmRUVEeza2ESITL wB0IlYm2h/nmullt1wdgRJ3xyvzXRXrfw6PI5Bjg2HIgiI2piavXSJb3054JH2NgRyVX +GjI683sD6Mchen2gelaK/gk+uORb9WBdemjXgTD7e1NdF04ipQ0il+0IqotBAJVDRuL 1XGXRlMP1eo90+MVVkPQsRqLVnXJiEw1smxpo9jqPaQFJAjncYPcaBREMeI//kxEb8Rb 98vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=Zyy41IcN; 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-61982-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61982-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com X-Forwarded-Encrypted: i=2; AJvYcCVDWthr1Nr3UUd9eg+vnegQiAy4Zr5HTtKU549G6cjo8LQ+XQhuyyiWsd/SmzJCRMV5XSvumxMn34dvVRO0lBeh3Yp9gg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i23-20020aa78d97000000b006e09456ba83si5138581pfr.71.2024.02.12.08.38.55 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 08:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61982-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=Zyy41IcN; 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-61982-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61982-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 0B6F42839A3 for <ouuuleilei@gmail.com>; Mon, 12 Feb 2024 16:38:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B045E5103F; Mon, 12 Feb 2024 16:31:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="Zyy41IcN" 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 EC9B63D0DD; Mon, 12 Feb 2024 16:31:05 +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=1707755468; cv=none; b=tgJ66TlGDzpyT3wNKUS+jjyBwkvno+OpevYCqq7+5OMLWltJuzYovyhjnaCseHLqPP61RYHpLarvTccWUCBiF4yTdc31aK8Z4t7JNO0ncWmAMP8LkYxEKsRg8Xof8gbFhdrjKnuTPLKmWy1T4M5io6aXeLMKj4EQFKiI961kdBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707755468; c=relaxed/simple; bh=I3VS2JL5QdpOumZEunORNSa20I7SphHpfPnc7uZLU3E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sV8Hhc+I7YG3Z54Mv/HIjSp9Pfkyar3MPhBxVry1odJjxCHVidPpzzPRAX8Zh9d6ZPZoB/FpJ6fiaI6PWCVbJ1xjyyp5lSCvhx7/Oimb6bUKt1+zjFJFy508wzFO7a/Md4yxOOJdmcAvigzmEDCoMdlOaZNAwCao+1iOmHziKa8= 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=Zyy41IcN; 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=1707755465; bh=I3VS2JL5QdpOumZEunORNSa20I7SphHpfPnc7uZLU3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zyy41IcNoqtQbIMqRtQkRf04RF8pHGrvLxtkDunUMa3xLSO7TDS/UTVZLcYlA50F0 W1hr+wGMM+ODEVJNO4I89b0Uom5QMH6vetzyPPSevwF0jTDeRAeWyJFGpQqGwx0eWr +nL5vdHpKPv75vPDGb9eGpvPBmp11fTrfr31D6F9z1Z+eosGAw+BFPLxftCWsSy0LT voSfnVGo10xz/kQWoJRH8ILXBsiTAZ/oyHYutOC88YWMjNsXImVaA1M+mXDKeE+dOh zs2AqPHYZ0nsKgPKHRTMA2OXeYdoYlGm8PVTtqi7NNaA7c2CWs7eXGRGoX+ksIqy5D uaViYgjXjXozQ== 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 4TYVMD5XlbzYCW; Mon, 12 Feb 2024 11:31:04 -0500 (EST) From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> To: Dan Williams <dan.j.williams@intel.com>, Arnd Bergmann <arnd@arndb.de>, Dave Chinner <david@fromorbit.com> Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, Vishal Verma <vishal.l.verma@intel.com>, Dave Jiang <dave.jiang@intel.com>, Matthew Wilcox <willy@infradead.org>, Russell King <linux@armlinux.org.uk>, linux-arch@vger.kernel.org, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, dm-devel@lists.linux.dev, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, Alasdair Kergon <agk@redhat.com>, Mike Snitzer <snitzer@kernel.org>, Mikulas Patocka <mpatocka@redhat.com> Subject: [PATCH v5 4/8] dcssblk: Handle alloc_dax() -EOPNOTSUPP failure Date: Mon, 12 Feb 2024 11:30:57 -0500 Message-Id: <20240212163101.19614-5-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240212163101.19614-1-mathieu.desnoyers@efficios.com> References: <20240212163101.19614-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: 1790711887279110995 X-GMAIL-MSGID: 1790711887279110995 |
Series |
Introduce cpu_dcache_is_aliasing() to fix DAX regression
|
|
Commit Message
Mathieu Desnoyers
Feb. 12, 2024, 4:30 p.m. UTC
In preparation for checking whether the architecture has data cache aliasing within alloc_dax(), modify the error handling of dcssblk dcssblk_add_store() to handle alloc_dax() -EOPNOTSUPP failures. Considering that s390 is not a data cache aliasing architecture, and considering that DCSSBLK selects DAX, a return value of -EOPNOTSUPP from alloc_dax() should make dcssblk_add_store() fail. Fixes: d92576f1167c ("dax: does not work correctly with virtual aliasing caches") Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Cc: Alasdair Kergon <agk@redhat.com> Cc: Mike Snitzer <snitzer@kernel.org> Cc: Mikulas Patocka <mpatocka@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.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: linux-arch@vger.kernel.org Cc: linux-cxl@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: dm-devel@lists.linux.dev Cc: nvdimm@lists.linux.dev Cc: linux-s390@vger.kernel.org --- drivers/s390/block/dcssblk.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Comments
On Mon, Feb 12, 2024 at 11:30:57AM -0500, Mathieu Desnoyers wrote: > In preparation for checking whether the architecture has data cache > aliasing within alloc_dax(), modify the error handling of dcssblk > dcssblk_add_store() to handle alloc_dax() -EOPNOTSUPP failures. > > Considering that s390 is not a data cache aliasing architecture, > and considering that DCSSBLK selects DAX, a return value of -EOPNOTSUPP > from alloc_dax() should make dcssblk_add_store() fail. > > Fixes: d92576f1167c ("dax: does not work correctly with virtual aliasing caches") > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > Reviewed-by: Dan Williams <dan.j.williams@intel.com> .. > --- > drivers/s390/block/dcssblk.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) Acked-by: Heiko Carstens <hca@linux.ibm.com>
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 4b7ecd4fd431..f363c1d51d9a 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -549,6 +549,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char int rc, i, j, num_of_segments; struct dcssblk_dev_info *dev_info; struct segment_info *seg_info, *temp; + struct dax_device *dax_dev; char *local_buf; unsigned long seg_byte_size; @@ -677,13 +678,13 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char if (rc) goto put_dev; - dev_info->dax_dev = alloc_dax(dev_info, &dcssblk_dax_ops); - if (IS_ERR(dev_info->dax_dev)) { - rc = PTR_ERR(dev_info->dax_dev); - dev_info->dax_dev = NULL; + dax_dev = alloc_dax(dev_info, &dcssblk_dax_ops); + if (IS_ERR(dax_dev)) { + rc = PTR_ERR(dax_dev); goto put_dev; } - set_dax_synchronous(dev_info->dax_dev); + set_dax_synchronous(dax_dev); + dev_info->dax_dev = dax_dev; rc = dax_add_host(dev_info->dax_dev, dev_info->gd); if (rc) goto out_dax;