diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-11 16:06:36 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-01-14 09:00:36 -0500 |
commit | 5305cb830834549b9203ad4d009ad5483c5e293f (patch) | |
tree | 9781e0181cb1f3c8f6fa2c5ad2de445333383b87 /fs/buffer.c | |
parent | f0059afd3e6e7aa1a0ffc23468b74c43d47660b8 (diff) |
block: add block_{touch|dirty}_buffer tracepoint
The former is triggered from touch_buffer() and the latter
mark_buffer_dirty().
This is part of tracepoint additions to improve visiblity into
dirtying / writeback operations for io tracer and userland.
v2: Transformed writeback_dirty_buffer to block_dirty_buffer and made
it share TP definition with block_touch_buffer.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index a8c2dfb68dcd..87ff335fbbe3 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/bitops.h> | 41 | #include <linux/bitops.h> |
42 | #include <linux/mpage.h> | 42 | #include <linux/mpage.h> |
43 | #include <linux/bit_spinlock.h> | 43 | #include <linux/bit_spinlock.h> |
44 | #include <trace/events/block.h> | ||
44 | 45 | ||
45 | static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); | 46 | static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); |
46 | 47 | ||
@@ -55,6 +56,7 @@ EXPORT_SYMBOL(init_buffer); | |||
55 | 56 | ||
56 | inline void touch_buffer(struct buffer_head *bh) | 57 | inline void touch_buffer(struct buffer_head *bh) |
57 | { | 58 | { |
59 | trace_block_touch_buffer(bh); | ||
58 | mark_page_accessed(bh->b_page); | 60 | mark_page_accessed(bh->b_page); |
59 | } | 61 | } |
60 | EXPORT_SYMBOL(touch_buffer); | 62 | EXPORT_SYMBOL(touch_buffer); |
@@ -1119,6 +1121,8 @@ void mark_buffer_dirty(struct buffer_head *bh) | |||
1119 | { | 1121 | { |
1120 | WARN_ON_ONCE(!buffer_uptodate(bh)); | 1122 | WARN_ON_ONCE(!buffer_uptodate(bh)); |
1121 | 1123 | ||
1124 | trace_block_dirty_buffer(bh); | ||
1125 | |||
1122 | /* | 1126 | /* |
1123 | * Very *carefully* optimize the it-is-already-dirty case. | 1127 | * Very *carefully* optimize the it-is-already-dirty case. |
1124 | * | 1128 | * |