All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
@ 2015-02-19 13:24 Pratyush Anand
  2015-02-19 16:39 ` Eric Sandeen
  2015-02-19 17:20 ` Brian Foster
  0 siblings, 2 replies; 7+ messages in thread
From: Pratyush Anand @ 2015-02-19 13:24 UTC (permalink / raw)
  To: david, xfs; +Cc: Pratyush Anand, jbastian, ddutile

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.

Signed-off-by: Pratyush Anand <panand@redhat.com>
---
 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;
 
-- 
2.1.0

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
  2015-02-19 13:24 [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing Pratyush Anand
@ 2015-02-19 16:39 ` Eric Sandeen
  2015-02-19 22:32   ` Don Dutile
  2015-02-19 17:20 ` Brian Foster
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Sandeen @ 2015-02-19 16:39 UTC (permalink / raw)
  To: Pratyush Anand, david, xfs; +Cc: jbastian, ddutile

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.

Thanks,
-Eric

> Signed-off-by: Pratyush Anand <panand@redhat.com>
> ---
>  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;
>  
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
  2015-02-19 13:24 [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing Pratyush Anand
  2015-02-19 16:39 ` Eric Sandeen
@ 2015-02-19 17:20 ` Brian Foster
  2015-02-19 17:25   ` Pratyush Anand
  2015-02-19 21:37   ` Dave Chinner
  1 sibling, 2 replies; 7+ messages in thread
From: Brian Foster @ 2015-02-19 17:20 UTC (permalink / raw)
  To: Pratyush Anand; +Cc: ddutile, jbastian, xfs

On Thu, Feb 19, 2015 at 06:54:33PM +0530, 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.
> 
> Signed-off-by: Pratyush Anand <panand@redhat.com>
> ---

A fix for this has been posted here:

http://oss.sgi.com/archives/xfs/2015-02/msg00101.html

Brian

>  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;
>  
> -- 
> 2.1.0
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
  2015-02-19 17:20 ` Brian Foster
@ 2015-02-19 17:25   ` Pratyush Anand
  2015-02-19 21:37   ` Dave Chinner
  1 sibling, 0 replies; 7+ messages in thread
From: Pratyush Anand @ 2015-02-19 17:25 UTC (permalink / raw)
  To: Brian Foster; +Cc: ddutile, jbastian, xfs



On Thursday 19 February 2015 10:50 PM, Brian Foster wrote:
> On Thu, Feb 19, 2015 at 06:54:33PM +0530, 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.
>>
>> Signed-off-by: Pratyush Anand <panand@redhat.com>
>> ---
>
> A fix for this has been posted here:
>
> http://oss.sgi.com/archives/xfs/2015-02/msg00101.html
>

Thanks Brian

~Pratyush

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
  2015-02-19 17:20 ` Brian Foster
  2015-02-19 17:25   ` Pratyush Anand
@ 2015-02-19 21:37   ` Dave Chinner
  2015-02-19 22:35     ` Don Dutile
  1 sibling, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2015-02-19 21:37 UTC (permalink / raw)
  To: Brian Foster; +Cc: Pratyush Anand, jbastian, ddutile, xfs

On Thu, Feb 19, 2015 at 12:20:28PM -0500, Brian Foster wrote:
> On Thu, Feb 19, 2015 at 06:54:33PM +0530, 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.
> > 
> > Signed-off-by: Pratyush Anand <panand@redhat.com>
> > ---
> 
> A fix for this has been posted here:
> 
> http://oss.sgi.com/archives/xfs/2015-02/msg00101.html

It's already in the 3.20-rc0 kernel, and it was marked as a stable
patch so should be fixed in the next 3.19 stable kernel.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
  2015-02-19 16:39 ` Eric Sandeen
@ 2015-02-19 22:32   ` Don Dutile
  0 siblings, 0 replies; 7+ messages in thread
From: Don Dutile @ 2015-02-19 22:32 UTC (permalink / raw)
  To: Eric Sandeen, Pratyush Anand, david, xfs; +Cc: jbastian

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.
>
> Thanks,
> -Eric
>
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@redhat.com>
>> ---
>>   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;
>>
>>
>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing
  2015-02-19 21:37   ` Dave Chinner
@ 2015-02-19 22:35     ` Don Dutile
  0 siblings, 0 replies; 7+ messages in thread
From: Don Dutile @ 2015-02-19 22:35 UTC (permalink / raw)
  To: Dave Chinner, Brian Foster; +Cc: Pratyush Anand, jbastian, xfs

On 02/19/2015 04:37 PM, Dave Chinner wrote:
> On Thu, Feb 19, 2015 at 12:20:28PM -0500, Brian Foster wrote:
>> On Thu, Feb 19, 2015 at 06:54:33PM +0530, 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.
>>>
>>> Signed-off-by: Pratyush Anand <panand@redhat.com>
>>> ---
>>
>> A fix for this has been posted here:
>>
>> http://oss.sgi.com/archives/xfs/2015-02/msg00101.html
>
> It's already in the 3.20-rc0 kernel, and it was marked as a stable
> patch so should be fixed in the next 3.19 stable kernel.
>
We (RHELSA) are not tracking 3.19 stable; just rebased to 3.19-final (from -rc5).
But, you make me think we *should* track 3.19 stable now (our Beta kernel base).

> Cheers,
>
> Dave.
>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-19 22:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 13:24 [PATCH RFC] fs: xfs: Fix xfs_trans_read_buf event tracing Pratyush Anand
2015-02-19 16:39 ` Eric Sandeen
2015-02-19 22:32   ` Don Dutile
2015-02-19 17:20 ` Brian Foster
2015-02-19 17:25   ` Pratyush Anand
2015-02-19 21:37   ` Dave Chinner
2015-02-19 22:35     ` Don Dutile

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.