xfs
[Top] [All Lists]

Re: [PATCH 004/119] xfs: enable buffer deadlock postmortem diagnosis via

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 004/119] xfs: enable buffer deadlock postmortem diagnosis via ftrace
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 21 Jun 2016 10:47:32 +1000
Cc: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, vishal.l.verma@xxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160617113423.GC19042@xxxxxxxxxxxxx>
References: <146612627129.12839.3827886950949809165.stgit@xxxxxxxxxxxxxxxx> <146612629822.12839.7938642541078923297.stgit@xxxxxxxxxxxxxxxx> <20160617113423.GC19042@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Jun 17, 2016 at 04:34:23AM -0700, Christoph Hellwig wrote:
> > diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> > index efa2a73..2333db7 100644
> > --- a/fs/xfs/xfs_buf.c
> > +++ b/fs/xfs/xfs_buf.c
> > @@ -947,7 +947,8 @@ xfs_buf_trylock(
> >     if (locked)
> >             XB_SET_OWNER(bp);
> >  
> > -   trace_xfs_buf_trylock(bp, _RET_IP_);
> > +   locked ? trace_xfs_buf_trylock(bp, _RET_IP_) :
> > +            trace_xfs_buf_trylock_fail(bp, _RET_IP_);
> >     return locked;
> 
> I think this should be something like:
> 
>       if (locked) {
>               XB_SET_OWNER(bp);
>               trace_xfs_buf_trylock(bp, _RET_IP_);
>       } else {
>               trace_xfs_buf_trylock_fail(bp, _RET_IP_);
>       }
> 
> otherwise this looks good and can go in without the rest of the series.

I'll fix that up on commit.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>