<div dir="ltr"><div><div>Hi Brain,<br></div>Thank you for your update, and I have applied your last kernel patch. However it is not easy to reproduce especially in out test environment. Till now is not happens again. I'll update the kernel patch now. BTW is there any findings in the logs of previous thread?<br>
<a href="http://oss.sgi.com/archives/xfs/2013-04/msg00327.html" target="_blank">http://oss.sgi.com/archives/xfs/2013-04/msg00327.html</a><br>I guess it tend to happen during glusterfs rebalance because glusterfs moves a lot of file from one server to another and then unlink it.<br>
<br></div>Thank you.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/17 Brian Foster <span dir="ltr"><<a href="mailto:bfoster@redhat.com" target="_blank">bfoster@redhat.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 04/16/2013 12:24 PM, Dave Chinner wrote:<br>
> On Mon, Apr 15, 2013 at 07:14:39PM -0400, Brian Foster wrote:<br>
>> Hi,<br>
>><br>
>> Thanks for the data in the previous thread:<br>
>><br>
>> <a href="http://oss.sgi.com/archives/xfs/2013-04/msg00327.html" target="_blank">http://oss.sgi.com/archives/xfs/2013-04/msg00327.html</a><br>
>><br>
</div>...<br>
<div class="im">>><br>
>>      echo 1 > /sys/kernel/debug/tracing/events/xfs/xfs_iunlink/enable<br>
>>      echo 1 > /sys/kernel/debug/tracing/events/xfs/xfs_iunlink_remove/enable<br>
>>      ... reproduce ...<br>
>>      cat /sys/kernel/debug/tracing/trace > trace.output<br>
><br>
> It's better to use trace-cmd for this. it will result in less<br>
> dropped events. i.e.:<br>
><br>
>       $ trace-cmd record -e xfs_iunlink\*<br>
>       ... reproduce ...<br>
>       ^C<br>
>       $ trace-cmd report > trace.output<br>
><br>
>> --- a/fs/xfs/linux-2.6/xfs_trace.h<br>
>> +++ b/fs/xfs/linux-2.6/xfs_trace.h<br>
>> @@ -581,6 +581,8 @@ DEFINE_INODE_EVENT(xfs_file_fsync);<br>
</div>...<br>
<div class="im">><br>
> I would suggest that the the tracing shoul dbe at entry of the<br>
> function, otherwise we won't get a tracepoint for the operation that<br>
> triggers the shutdown. (That's the reason most tracepoints in XFS<br>
> are at function entry...)<br>
><br>
<br>
</div>Good points, thanks Dave. A v2 that pulls up the tracepoints towards<br>
function entry is appended.<br>
<br>
Brian<br>
<br>
>From 280943e78ebe0b97a774cba51e7815c42f044b55 Mon Sep 17 00:00:00 2001<br>
From: Brian Foster <<a href="mailto:bfoster@redhat.com">bfoster@redhat.com</a>><br>
Date: Mon, 15 Apr 2013 18:16:24 -0400<br>
Subject: [PATCH v2] xfs: add tracepoints for xfs_iunlink and<br>
xfs_iunlink_remove<br>
<div class="im"><br>
---<br>
 fs/xfs/linux-2.6/xfs_trace.h |    2 ++<br>
 fs/xfs/xfs_inode.c           |    4 ++++<br>
 2 files changed, 6 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h<br>
</div>index adc6ec4..338a0f9 100644<br>
--- a/fs/xfs/linux-2.6/xfs_trace.h<br>
+++ b/fs/xfs/linux-2.6/xfs_trace.h<br>
@@ -583,6 +583,8 @@ DEFINE_INODE_EVENT(xfs_file_fsync);<br>
 DEFINE_INODE_EVENT(xfs_destroy_inode);<br>
 DEFINE_INODE_EVENT(xfs_dirty_inode);<br>
<div class="im"> DEFINE_INODE_EVENT(xfs_clear_inode);<br>
+DEFINE_INODE_EVENT(xfs_iunlink);<br>
+DEFINE_INODE_EVENT(xfs_iunlink_remove);<br>
<br>
 DEFINE_INODE_EVENT(xfs_dquot_dqalloc);<br>
 DEFINE_INODE_EVENT(xfs_dquot_dqdetach);<br>
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c<br>
</div>index 19900f0..d705c77 100644<br>
--- a/fs/xfs/xfs_inode.c<br>
+++ b/fs/xfs/xfs_inode.c<br>
@@ -1615,6 +1615,8 @@ xfs_iunlink(<br>
<br>
        mp = tp->t_mountp;<br>
<br>
+       trace_xfs_iunlink(ip);<br>
+<br>
        /*<br>
         * Get the agi buffer first.  It ensures lock ordering<br>
         * on the list.<br>
@@ -1694,6 +1696,8 @@ xfs_iunlink_remove(<br>
        mp = tp->t_mountp;<br>
        agno = XFS_INO_TO_AGNO(mp, ip->i_ino);<br>
<br>
+       trace_xfs_iunlink_remove(ip);<br>
+<br>
        /*<br>
         * Get the agi buffer first.  It ensures lock ordering<br>
         * on the list.<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.7.6<br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>·ûÓÀÌÎ
</div>