Re: [PATCH v2 2/2] xfs: clean up some unnecessary xfs_stack_trace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Darrick,
On 2023/4/22 11:57, Darrick J. Wong wrote:
On Fri, Apr 21, 2023 at 07:37:16PM +0800, Guo Xuenan wrote:
With xfs print level parsing correctly, these duplicate dump
information can be removed.

Signed-off-by: Guo Xuenan <guoxuenan@xxxxxxxxxx>
---
  fs/xfs/libxfs/xfs_ialloc.c | 1 -
  fs/xfs/xfs_error.c         | 9 ---------
  fs/xfs/xfs_fsops.c         | 2 --
  fs/xfs/xfs_log.c           | 2 --
  4 files changed, 14 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index a16d5de16933..df4e4eb19f14 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -2329,7 +2329,6 @@ xfs_imap(
  				__func__, ino,
  				XFS_AGINO_TO_INO(mp, pag->pag_agno, agino));
  		}
-		xfs_stack_trace();
Hmm, this one was unconditional, wasn't it?  That looks like an omission
to me, so I'm calling it out in case anyone had hard opinions about it.
Otherwise,
It is unnecessary, since there are xfs_alert to report failure here.
if really need to get stack information, set error_level is enough, because
both of conditional branch have xfs_alert. To avoid repetition, in my opinion,
it's better to be removed.

Thanks
Xuenan
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

--D

  #endif /* DEBUG */
  		return error;
  	}
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index b2cbbba3e15a..7c8e1f3b69a6 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -421,9 +421,6 @@ xfs_buf_corruption_error(
  		  fa, bp->b_ops->name, xfs_buf_daddr(bp));
xfs_alert(mp, "Unmount and run xfs_repair");
-
-	if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
-		xfs_stack_trace();
  }
/*
@@ -459,9 +456,6 @@ xfs_buf_verifier_error(
  				sz);
  		xfs_hex_dump(buf, sz);
  	}
-
-	if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
-		xfs_stack_trace();
  }
/*
@@ -509,7 +503,4 @@ xfs_inode_verifier_error(
  				sz);
  		xfs_hex_dump(buf, sz);
  	}
-
-	if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
-		xfs_stack_trace();
  }
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 13851c0d640b..e08b1ce109d9 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -546,8 +546,6 @@ xfs_do_force_shutdown(
  			why, flags, __return_address, fname, lnnum);
  	xfs_alert(mp,
  		"Please unmount the filesystem and rectify the problem(s)");
-	if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
-		xfs_stack_trace();
  }
/*
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index fc61cc024023..e4e4da33281d 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -3808,8 +3808,6 @@ xlog_force_shutdown(
  				shutdown_flags);
  		xfs_alert(log->l_mp,
  "Please unmount the filesystem and rectify the problem(s).");
-		if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
-			xfs_stack_trace();
  	}
/*
--
2.31.1





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux