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 <ruansy.f...@fujitsu.com>
Cc: Christoph Hellwig <h...@lst.de>
Cc: Darrick J. Wong <djw...@kernel.org>
Cc: Al Viro <v...@zeniv.linux.org.uk>
Cc: Dave Chinner <da...@fromorbit.com>
Cc: Goldwyn Rodrigues <rgold...@suse.de>
Cc: Jane Chu <jane....@oracle.com>
Cc: Matthew Wilcox <wi...@infradead.org>
Cc: Miaohe Lin <linmia...@huawei.com>
Cc: Naoya Horiguchi <naoya.horigu...@nec.com>
Cc: Ritesh Harjani <rite...@linux.ibm.com>
Cc: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.willi...@intel.com>
---
 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;
        }
 


Reply via email to