[Top] [All Lists]

Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing

To: Eric Sandeen <sandeen@xxxxxxxxxxx>, Pratyush Anand <panand@xxxxxxxxxx>, david@xxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Subject: Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
From: Don Dutile <ddutile@xxxxxxxxxx>
Date: Thu, 19 Feb 2015 17:32:23 -0500
Cc: jbastian@xxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <54E611BA.7010806@xxxxxxxxxxx>
References: <7fb3278485ca5d8b48cd1ba980be6cc11dafc11b.1424352124.git.panand@xxxxxxxxxx> <54E611BA.7010806@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0
On 02/19/2015 11:39 AM, Eric Sandeen wrote:
On 2/19/15 7:24 AM, Pratyush Anand wrote:
My root file system is xfs. As soon as I enable event for
xfs_trans_read_buf `echo xfs:xfs_trans_read_buf >>
/sys/kernel/debug/tracing/set_event`, I see a kernel panic.

A little bit of debugging shows that bp->b_fspriv is NULL many a time
when trace_xfs_trans_read_buf(bp->b_fspriv) is called.

I do not have any idea about xfs filesystem. So, I am not sure, if it
is expected to have bp->b_fspriv = NULL at this location.

This patch fixes the issue, until we have a better fix.

What kernel did you hit this on?  What did the backtrace look like?

I've been unable to reproduce the problem so far.


RHELSA snap7 kernel (that's RHEL Server for ARM; 3.19-based).

Thanks for everyone's attention. Pratyush has provided a link
to the upstream patch, that we have to pull into our kernel.

Signed-off-by: Pratyush Anand <panand@xxxxxxxxxx>
  fs/xfs/xfs_trans_buf.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 0a4d4ab6d9a9..0b67a20643bf 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -329,7 +329,8 @@ xfs_trans_read_buf_map(

        if (tp)
                _xfs_trans_bjoin(tp, bp, 1);
-       trace_xfs_trans_read_buf(bp->b_fspriv);
+       if (bp->b_fspriv)
+               trace_xfs_trans_read_buf(bp->b_fspriv);
        *bpp = bp;
        return 0;

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