From: Theodore Ts'o <tytso@mit.edu>
To: Linux Filesystem Development List <linux-fsdevel@vger.kernel.org>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
Linux btrfs Developers List <linux-btrfs@vger.kernel.org>,
XFS Developers <xfs@oss.sgi.com>, Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH-v3 4/6] vfs: add lazytime tracepoints for better debugging
Date: Tue, 25 Nov 2014 00:34:32 -0500 [thread overview]
Message-ID: <1416893674-419-5-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1416893674-419-1-git-send-email-tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
fs/fs-writeback.c | 5 ++++-
fs/inode.c | 5 +++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index eb04277..cab2d6d 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -27,6 +27,7 @@
#include <linux/backing-dev.h>
#include <linux/tracepoint.h>
#include <linux/device.h>
+#include <trace/events/fs.h>
#include "internal.h"
/*
@@ -1304,8 +1305,10 @@ static void flush_sb_dirty_time(struct super_block *sb)
iput(old_inode);
old_inode = inode;
- if (dirty_time)
+ if (dirty_time) {
+ trace_fs_lazytime_flush(inode);
mark_inode_dirty(inode);
+ }
cond_resched();
spin_lock(&inode_sb_list_lock);
}
diff --git a/fs/inode.c b/fs/inode.c
index 34a443f..6319ead 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -20,6 +20,9 @@
#include <linux/list_lru.h>
#include "internal.h"
+#define CREATE_TRACE_POINTS
+#include <trace/events/fs.h>
+
/*
* Inode locking rules:
*
@@ -544,6 +547,7 @@ static void evict(struct inode *inode)
mark_inode_dirty(inode);
inode->i_sb->s_op->write_inode(inode, &wbc);
}
+ trace_fs_lazytime_evict(inode);
}
if (!list_empty(&inode->i_wb_list))
@@ -1550,6 +1554,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags)
inode->i_state |= I_DIRTY_TIME;
spin_unlock(&inode->i_lock);
inode->i_ts_dirty_day = daycode;
+ trace_fs_lazytime_defer(inode);
return 0;
}
}
--
2.1.0
next prev parent reply other threads:[~2014-11-25 5:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 5:34 [PATCH-v3 0/6] add support for a lazytime mount option Theodore Ts'o
2014-11-25 5:34 ` [PATCH-v3 1/6] fs: split update_time() into update_time() and write_time() Theodore Ts'o
2014-11-25 16:00 ` David Sterba
2014-11-25 5:34 ` [PATCH-v3 2/6] vfs: add support for a lazytime mount option Theodore Ts'o
2014-11-25 5:34 ` [PATCH-v3 3/6] vfs: don't let the dirty time inodes get more than a day stale Theodore Ts'o
2014-11-25 14:58 ` Rasmus Villemoes
2014-11-25 15:55 ` Theodore Ts'o
2014-11-25 5:34 ` Theodore Ts'o [this message]
2014-11-25 5:34 ` [PATCH-v3 5/6] ext4: add support for a lazytime mount option Theodore Ts'o
2014-11-25 5:34 ` [PATCH-v3 6/6] btrfs: add an is_readonly() so btrfs can use common code for update_time() Theodore Ts'o
2014-11-25 16:02 ` David Sterba
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=1416893674-419-5-git-send-email-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).