All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 2/2] xfs: print name of function causing fs shutdown instead of hex pointer
Date: Wed, 16 Jun 2021 16:55:36 -0700	[thread overview]
Message-ID: <162388773604.3427063.17701184250204042441.stgit@locust> (raw)
In-Reply-To: <162388772484.3427063.6225456710511333443.stgit@locust>

From: Darrick J. Wong <djwong@kernel.org>

In xfs_do_force_shutdown, print the symbolic name of the function that
called us to shut down the filesystem instead of a raw hex pointer.
This makes debugging a lot easier:

XFS (sda): xfs_do_force_shutdown(0x2) called from line 2440 of file
	fs/xfs/xfs_log.c. Return address = ffffffffa038bc38

becomes:

XFS (sda): xfs_do_force_shutdown(0x2) called from line 2440 of file
	fs/xfs/xfs_log.c. Return address = xfs_trans_mod_sb+0x25

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/xfs_fsops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 07c745cd483e..b7f979eca1e2 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -543,7 +543,7 @@ xfs_do_force_shutdown(
 	}
 
 	xfs_notice(mp,
-"%s(0x%x) called from line %d of file %s. Return address = "PTR_FMT,
+"%s(0x%x) called from line %d of file %s. Return address = %pS",
 		__func__, flags, lnnum, fname, __return_address);
 
 	if (flags & SHUTDOWN_CORRUPT_INCORE) {


  parent reply	other threads:[~2021-06-16 23:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 23:55 [PATCHSET 0/2] xfs: various small fixes Darrick J. Wong
2021-06-16 23:55 ` [PATCH 1/2] xfs: fix type mismatches in the inode reclaim functions Darrick J. Wong
2021-06-17  7:58   ` Christoph Hellwig
2021-06-17 15:14   ` Chandan Babu R
2021-06-18 14:33   ` Brian Foster
2021-06-18 14:59     ` Darrick J. Wong
2021-06-16 23:55 ` Darrick J. Wong [this message]
2021-06-17  8:11   ` [PATCH 2/2] xfs: print name of function causing fs shutdown instead of hex pointer Christoph Hellwig
2021-06-17 16:10     ` Darrick J. Wong
2021-06-18 13:58       ` Christoph Hellwig
2021-06-18 16:05         ` Darrick J. Wong
2021-06-18 14:34   ` Brian Foster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162388773604.3427063.17701184250204042441.stgit@locust \
    --to=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.