From patchwork Fri Aug 26 17:17:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 12956331 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 10A64ECAAA6 for ; Fri, 26 Aug 2022 17:18:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A3C87940009; Fri, 26 Aug 2022 13:17:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C511940008; Fri, 26 Aug 2022 13:17:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 865B8940009; Fri, 26 Aug 2022 13:17:59 -0400 (EDT) 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 7007D940008 for ; Fri, 26 Aug 2022 13:17:59 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 5006E1407FF for ; Fri, 26 Aug 2022 17:17:59 +0000 (UTC) X-FDA: 79842401478.15.A613CD4 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by imf27.hostedemail.com (Postfix) with ESMTP id C5B1E4001C for ; Fri, 26 Aug 2022 17:17:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661534277; x=1693070277; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eytTo9jR/taEQMRxBFsY1ZsO/Az6sn3vkXQeKBBLxVw=; b=Lpbwiy0PCJxBznubZnh3gqRaYURoCIF8HONg2G4MwU57SvF6Eo2/9zLb nuDSeUiL3LRQvngdbz0TLr5VXZ0ZRyuMV0yqFkuIfb8tb+s9JhQCzvtmg G+FMalmg6PcC+adMkQemNlKi5xT1MUHvnQIm/CxRg7S/wAlO3wC+ewdbF 6KCdwtDqIpgVzPQzNn1tZKDV9UidaBcEjT3sAgJ0aAI6nG9fyxRww9rZS USM94sFnzVr2DbsU3jm9d3JKsfUt03/ddNACVwcIKPiX9AWUlebiNYc9W i8PbmriVM9O8E6Mk6fhEXLuwdT4/U30rBUMvaJoerp5+FxA1aSHkbUv06 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10451"; a="292134701" X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="292134701" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 10:17:55 -0700 X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="714035729" Received: from jodirobx-mobl2.amr.corp.intel.com (HELO dwillia2-xfh.jf.intel.com) ([10.209.108.22]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 10:17:55 -0700 Subject: [PATCH 1/4] xfs: Quiet notify_failure EOPNOTSUPP cases From: Dan Williams To: akpm@linux-foundation.org, djwong@kernel.org Cc: Shiyang Ruan , Christoph Hellwig , Al Viro , Dave Chinner , Goldwyn Rodrigues , Jane Chu , Matthew Wilcox , Miaohe Lin , Naoya Horiguchi , Ritesh Harjani , nvdimm@lists.linux.dev, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Date: Fri, 26 Aug 2022 10:17:54 -0700 Message-ID: <166153427440.2758201.6709480562966161512.stgit@dwillia2-xfh.jf.intel.com> In-Reply-To: <166153426798.2758201.15108211981034512993.stgit@dwillia2-xfh.jf.intel.com> References: <166153426798.2758201.15108211981034512993.stgit@dwillia2-xfh.jf.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661534278; a=rsa-sha256; cv=none; b=UyvLgF+irV/NzLZR0HmJxQTreF8sZ+71pqYy7h3um5UsalGc6oJbFM30DLLYkPswNRpjpj 8AqSoOT03A3Rrd2ouM41f7lIGz4cKgXFkFvDNIZRXxUv2LPdSTOPVlTFKqyc6PV4V0ET5y kBAMi1CsaUsv3pgdOgkwJEmPW9sGu2Y= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=Lpbwiy0P; spf=pass (imf27.hostedemail.com: domain of dan.j.williams@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661534278; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iqDbMyfI58bvkuErkzvXodY4E63qe64qbSM99XN0T/M=; b=4ip3UuIPpy+87E5PsUdsaUtAgDtRyCL40HsxuWddx9V/olzBLrHisWgQRutftGQi/q2XUR +VBQnsA7YM1I3LxUzUZCuHqNIH4F0H+i2bH9yTG6bfIEwOZD5lSl3dVosmLt+AnG/Vo4DY +Ut4aiWz/2m5KZLVsmeOHmHXi1rEzBA= X-Stat-Signature: dq1t81uswcmpuoux9zb4deadcxzwkemp X-Rspamd-Queue-Id: C5B1E4001C Authentication-Results: imf27.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=Lpbwiy0P; spf=pass (imf27.hostedemail.com: domain of dan.j.williams@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1661534277-146172 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: XFS always registers dax_holder_operations regardless of whether the filesystem is capable of handling the notifications. The expectation is that if the notify_failure handler cannot run then there are no scenarios where it needs to run. In other words the expected semantic is that page->index and page->mapping are valid for memory_failure() when the conditions that cause -EOPNOTSUPP in xfs_dax_notify_failure() are present. A fallback to the generic memory_failure() path is expected so do not warn when that happens. Fixes: 6f643c57d57c ("xfs: implement ->notify_failure() for XFS") Cc: Shiyang Ruan Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: Al Viro Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Cc: Andrew Morton Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_notify_failure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_notify_failure.c b/fs/xfs/xfs_notify_failure.c index 69d9c83ea4b2..01e2721589c4 100644 --- a/fs/xfs/xfs_notify_failure.c +++ b/fs/xfs/xfs_notify_failure.c @@ -181,7 +181,7 @@ xfs_dax_notify_failure( } if (mp->m_rtdev_targp && mp->m_rtdev_targp->bt_daxdev == dax_dev) { - xfs_warn(mp, + xfs_debug(mp, "notify_failure() not supported on realtime device!"); return -EOPNOTSUPP; } @@ -194,7 +194,7 @@ xfs_dax_notify_failure( } if (!xfs_has_rmapbt(mp)) { - xfs_warn(mp, "notify_failure() needs rmapbt enabled!"); + xfs_debug(mp, "notify_failure() needs rmapbt enabled!"); return -EOPNOTSUPP; }