Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 04/10] xfs: adder caller IP to xfs_defer* tracepoints
Date: Mon, 7 May 2018 08:17:07 -0400	[thread overview]
Message-ID: <20180507121706.GE38916@bfoster.bfoster> (raw)
In-Reply-To: <20180502080157.11386-5-david@fromorbit.com>

On Wed, May 02, 2018 at 06:01:51PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> So it's clear in the trace where they are being called from.
> 
> Signed-Off-By: Dave Chinner <dchinner@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/libxfs/xfs_defer.c | 12 ++++++------
>  fs/xfs/xfs_trace.h        | 17 +++++++++++------
>  2 files changed, 17 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c
> index 087fea02c389..51821af5d653 100644
> --- a/fs/xfs/libxfs/xfs_defer.c
> +++ b/fs/xfs/libxfs/xfs_defer.c
> @@ -220,7 +220,7 @@ xfs_defer_trans_abort(
>  {
>  	struct xfs_defer_pending	*dfp;
>  
> -	trace_xfs_defer_trans_abort(tp->t_mountp, dop);
> +	trace_xfs_defer_trans_abort(tp->t_mountp, dop, _RET_IP_);
>  
>  	/* Abort intent items that don't have a done item. */
>  	list_for_each_entry(dfp, &dop->dop_pending, dfp_list) {
> @@ -253,7 +253,7 @@ xfs_defer_trans_roll(
>  	for (i = 0; i < XFS_DEFER_OPS_NR_BUFS && dop->dop_bufs[i]; i++)
>  		xfs_trans_dirty_buf(*tp, dop->dop_bufs[i]);
>  
> -	trace_xfs_defer_trans_roll((*tp)->t_mountp, dop);
> +	trace_xfs_defer_trans_roll((*tp)->t_mountp, dop, _RET_IP_);
>  
>  	/* Roll the transaction. */
>  	error = xfs_trans_roll(tp);
> @@ -355,7 +355,7 @@ xfs_defer_finish(
>  
>  	ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES);
>  
> -	trace_xfs_defer_finish((*tp)->t_mountp, dop);
> +	trace_xfs_defer_finish((*tp)->t_mountp, dop, _RET_IP_);
>  
>  	/* Until we run out of pending work to finish... */
>  	while (xfs_defer_has_unfinished_work(dop)) {
> @@ -431,7 +431,7 @@ xfs_defer_finish(
>  	if (error)
>  		trace_xfs_defer_finish_error((*tp)->t_mountp, dop, error);
>  	else
> -		trace_xfs_defer_finish_done((*tp)->t_mountp, dop);
> +		trace_xfs_defer_finish_done((*tp)->t_mountp, dop, _RET_IP_);
>  	return error;
>  }
>  
> @@ -447,7 +447,7 @@ xfs_defer_cancel(
>  	struct list_head		*pwi;
>  	struct list_head		*n;
>  
> -	trace_xfs_defer_cancel(NULL, dop);
> +	trace_xfs_defer_cancel(NULL, dop, _RET_IP_);
>  
>  	/*
>  	 * Free the pending items.  Caller should already have arranged
> @@ -532,5 +532,5 @@ xfs_defer_init(
>  	*fbp = NULLFSBLOCK;
>  	INIT_LIST_HEAD(&dop->dop_intake);
>  	INIT_LIST_HEAD(&dop->dop_pending);
> -	trace_xfs_defer_init(NULL, dop);
> +	trace_xfs_defer_init(NULL, dop, _RET_IP_);
>  }
> diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> index 8136f2280173..947ab6e32c18 100644
> --- a/fs/xfs/xfs_trace.h
> +++ b/fs/xfs/xfs_trace.h
> @@ -2243,30 +2243,35 @@ struct xfs_defer_pending;
>  struct xfs_defer_ops;
>  
>  DECLARE_EVENT_CLASS(xfs_defer_class,
> -	TP_PROTO(struct xfs_mount *mp, struct xfs_defer_ops *dop),
> -	TP_ARGS(mp, dop),
> +	TP_PROTO(struct xfs_mount *mp, struct xfs_defer_ops *dop,
> +		 unsigned long caller_ip),
> +	TP_ARGS(mp, dop, caller_ip),
>  	TP_STRUCT__entry(
>  		__field(dev_t, dev)
>  		__field(void *, dop)
>  		__field(char, committed)
>  		__field(char, low)
> +		__field(unsigned long, caller_ip)
>  	),
>  	TP_fast_assign(
>  		__entry->dev = mp ? mp->m_super->s_dev : 0;
>  		__entry->dop = dop;
>  		__entry->committed = dop->dop_committed;
>  		__entry->low = dop->dop_low;
> +		__entry->caller_ip = caller_ip;
>  	),
> -	TP_printk("dev %d:%d ops %p committed %d low %d",
> +	TP_printk("dev %d:%d ops %p committed %d low %d, caller %pS",
>  		  MAJOR(__entry->dev), MINOR(__entry->dev),
>  		  __entry->dop,
>  		  __entry->committed,
> -		  __entry->low)
> +		  __entry->low,
> +		  (char *)__entry->caller_ip)
>  )
>  #define DEFINE_DEFER_EVENT(name) \
>  DEFINE_EVENT(xfs_defer_class, name, \
> -	TP_PROTO(struct xfs_mount *mp, struct xfs_defer_ops *dop), \
> -	TP_ARGS(mp, dop))
> +	TP_PROTO(struct xfs_mount *mp, struct xfs_defer_ops *dop, \
> +		 unsigned long caller_ip), \
> +	TP_ARGS(mp, dop, caller_ip))
>  
>  DECLARE_EVENT_CLASS(xfs_defer_error_class,
>  	TP_PROTO(struct xfs_mount *mp, struct xfs_defer_ops *dop, int error),
> -- 
> 2.17.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-05-07 12:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02  8:01 [PATCH 0/10] xfs: log item and transaction cleanups Dave Chinner
2018-05-02  8:01 ` [PATCH 01/10] xfs: log item flags are racy Dave Chinner
2018-05-07 12:16   ` Brian Foster
2018-05-07 14:45   ` Christoph Hellwig
2018-05-02  8:01 ` [PATCH 02/10] xfs: catch log items multiply joined to a transaction Dave Chinner
2018-05-07 12:16   ` Brian Foster
2018-05-07 14:48   ` Christoph Hellwig
2018-05-08  0:06     ` Dave Chinner
2018-05-02  8:01 ` [PATCH 03/10] xfs: add tracing to high level transaction operations Dave Chinner
2018-05-07 12:17   ` Brian Foster
2018-05-07 14:48   ` Christoph Hellwig
2018-05-02  8:01 ` [PATCH 04/10] xfs: adder caller IP to xfs_defer* tracepoints Dave Chinner
2018-05-07 12:17   ` Brian Foster [this message]
2018-05-07 14:49   ` Christoph Hellwig
2018-05-02  8:01 ` [PATCH 05/10] xfs: don't assert fail with AIL lock held Dave Chinner
2018-05-07 12:18   ` Brian Foster
2018-05-07 14:50     ` Christoph Hellwig
2018-05-07 23:59       ` Dave Chinner
2018-05-02  8:01 ` [PATCH 06/10] xfs: fix double ijoin in xfs_inactive_symlink_rmt() Dave Chinner
2018-05-07 14:51   ` Christoph Hellwig
2018-05-02  8:01 ` [PATCH 07/10] xfs: fix double ijoin in xfs_reflink_cancel_cow_range Dave Chinner
2018-05-07 14:51   ` Christoph Hellwig
2018-05-02  8:01 ` [PATCH 08/10] xfs: fix double ijoin in xfs_reflink_clear_inode_flag() Dave Chinner
2018-05-07 14:52   ` Christoph Hellwig
2018-05-02  8:01 ` [PATCH 09/10] xfs: add some more debug checks to buffer log item reuse Dave Chinner
2018-05-07 14:52   ` Christoph Hellwig
2018-05-02  8:01 ` [PATCH 10/10] xfs: get rid of the log item descriptor Dave Chinner
2018-05-02 20:05   ` Darrick J. Wong
2018-05-02 21:53     ` Dave Chinner
2018-05-03 23:47       ` Darrick J. Wong
2018-05-07 14:55   ` Christoph Hellwig

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=20180507121706.GE38916@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox