From: Brian Foster <bfoster@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: sandeen@sandeen.net, yongtaofu@gmail.com, xfs@oss.sgi.com
Subject: Re: xfs_iunlink_remove: xfs_inotobp() returned error 22 -- debugging
Date: Tue, 16 Apr 2013 13:18:27 -0400 [thread overview]
Message-ID: <516D87E3.2010605@redhat.com> (raw)
In-Reply-To: <20130416162417.GC13938@destitution>
On 04/16/2013 12:24 PM, Dave Chinner wrote:
> On Mon, Apr 15, 2013 at 07:14:39PM -0400, Brian Foster wrote:
>> Hi,
>>
>> Thanks for the data in the previous thread:
>>
>> http://oss.sgi.com/archives/xfs/2013-04/msg00327.html
>>
...
>>
>> echo 1 > /sys/kernel/debug/tracing/events/xfs/xfs_iunlink/enable
>> echo 1 > /sys/kernel/debug/tracing/events/xfs/xfs_iunlink_remove/enable
>> ... reproduce ...
>> cat /sys/kernel/debug/tracing/trace > trace.output
>
> It's better to use trace-cmd for this. it will result in less
> dropped events. i.e.:
>
> $ trace-cmd record -e xfs_iunlink\*
> ... reproduce ...
> ^C
> $ trace-cmd report > trace.output
>
>> --- a/fs/xfs/linux-2.6/xfs_trace.h
>> +++ b/fs/xfs/linux-2.6/xfs_trace.h
>> @@ -581,6 +581,8 @@ DEFINE_INODE_EVENT(xfs_file_fsync);
...
>
> I would suggest that the the tracing shoul dbe at entry of the
> function, otherwise we won't get a tracepoint for the operation that
> triggers the shutdown. (That's the reason most tracepoints in XFS
> are at function entry...)
>
Good points, thanks Dave. A v2 that pulls up the tracepoints towards
function entry is appended.
Brian
>From 280943e78ebe0b97a774cba51e7815c42f044b55 Mon Sep 17 00:00:00 2001
From: Brian Foster <bfoster@redhat.com>
Date: Mon, 15 Apr 2013 18:16:24 -0400
Subject: [PATCH v2] xfs: add tracepoints for xfs_iunlink and
xfs_iunlink_remove
---
fs/xfs/linux-2.6/xfs_trace.h | 2 ++
fs/xfs/xfs_inode.c | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h
index adc6ec4..338a0f9 100644
--- a/fs/xfs/linux-2.6/xfs_trace.h
+++ b/fs/xfs/linux-2.6/xfs_trace.h
@@ -583,6 +583,8 @@ DEFINE_INODE_EVENT(xfs_file_fsync);
DEFINE_INODE_EVENT(xfs_destroy_inode);
DEFINE_INODE_EVENT(xfs_dirty_inode);
DEFINE_INODE_EVENT(xfs_clear_inode);
+DEFINE_INODE_EVENT(xfs_iunlink);
+DEFINE_INODE_EVENT(xfs_iunlink_remove);
DEFINE_INODE_EVENT(xfs_dquot_dqalloc);
DEFINE_INODE_EVENT(xfs_dquot_dqdetach);
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 19900f0..d705c77 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1615,6 +1615,8 @@ xfs_iunlink(
mp = tp->t_mountp;
+ trace_xfs_iunlink(ip);
+
/*
* Get the agi buffer first. It ensures lock ordering
* on the list.
@@ -1694,6 +1696,8 @@ xfs_iunlink_remove(
mp = tp->t_mountp;
agno = XFS_INO_TO_AGNO(mp, ip->i_ino);
+ trace_xfs_iunlink_remove(ip);
+
/*
* Get the agi buffer first. It ensures lock ordering
* on the list.
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-04-16 17:21 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 23:14 xfs_iunlink_remove: xfs_inotobp() returned error 22 -- debugging Brian Foster
2013-04-16 16:24 ` Dave Chinner
2013-04-16 17:18 ` Brian Foster [this message]
2013-04-17 1:04 ` 符永涛
2013-04-17 1:35 ` 符永涛
2013-04-17 3:15 ` 符永涛
2013-04-17 3:48 ` 符永涛
2013-04-17 4:28 ` Eric Sandeen
2013-04-18 1:30 ` 符永涛
2013-04-18 6:45 ` 符永涛
2013-04-18 8:25 ` 符永涛
2013-04-18 11:41 ` Brian Foster
2013-04-18 15:23 ` 符永涛
2013-04-18 16:40 ` 符永涛
2013-04-18 17:03 ` Eric Sandeen
2013-04-18 18:35 ` Eric Sandeen
2013-04-18 20:59 ` Brian Foster
2013-04-19 6:40 ` 符永涛
2013-04-19 11:41 ` 符永涛
2013-04-19 14:59 ` Eric Sandeen
2013-04-19 15:13 ` 符永涛
2013-04-19 15:18 ` 符永涛
2013-04-19 16:16 ` Eric Sandeen
2013-04-19 16:47 ` 符永涛
2013-04-19 17:00 ` 符永涛
2013-04-19 17:04 ` Eric Sandeen
2013-04-19 17:08 ` 符永涛
2013-04-19 17:17 ` 符永涛
2013-04-20 0:03 ` 符永涛
2013-04-20 1:15 ` 符永涛
2013-04-20 2:51 ` 符永涛
2013-04-20 3:40 ` Eric Sandeen
2013-04-20 4:03 ` 符永涛
2013-04-20 4:11 ` 符永涛
2013-04-20 4:20 ` Eric Sandeen
2013-04-20 4:27 ` 符永涛
2013-04-20 10:10 ` 符永涛
2013-04-20 11:38 ` Brian Foster
2013-04-20 11:52 ` 符永涛
2013-04-20 12:58 ` Brian Foster
2013-04-20 13:12 ` 符永涛
2013-04-20 15:36 ` Eric Sandeen
[not found] ` <5172B73C.6000900@sandeen.net>
2013-04-20 23:52 ` 符永涛
2013-04-22 19:59 ` Eric Sandeen
2013-04-23 0:08 ` Dave Chinner
2013-04-23 0:52 ` Eric Sandeen
2013-04-23 1:31 ` 符永涛
2013-04-24 9:02 ` Dave Chinner
2013-04-24 10:21 ` 符永涛
2013-04-25 0:48 ` 符永涛
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=516D87E3.2010605@redhat.com \
--to=bfoster@redhat.com \
--cc=david@fromorbit.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
--cc=yongtaofu@gmail.com \
/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 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.