diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-04-18 09:18:38 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-04-20 04:01:58 -0400 |
commit | c83ae9cad8776bab153a05cc466be39f14011091 (patch) | |
tree | b8ae7e94b03e3e6d21df24ff41d466ea552b6ccb /fs/gfs2 | |
parent | 4667a0ec32867865fd4deccf834594b3ea831baf (diff) |
GFS2: Add an AIL writeback tracepoint
Add a tracepoint for monitoring writeback of the AIL.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/log.c | 2 | ||||
-rw-r--r-- | fs/gfs2/trace_gfs2.h | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 03e00417061b..ad1f1887633f 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -144,6 +144,7 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc) | |||
144 | struct list_head *head = &sdp->sd_ail1_list; | 144 | struct list_head *head = &sdp->sd_ail1_list; |
145 | struct gfs2_ail *ai; | 145 | struct gfs2_ail *ai; |
146 | 146 | ||
147 | trace_gfs2_ail_flush(sdp, wbc, 1); | ||
147 | spin_lock(&sdp->sd_ail_lock); | 148 | spin_lock(&sdp->sd_ail_lock); |
148 | list_for_each_entry_reverse(ai, head, ai_list) { | 149 | list_for_each_entry_reverse(ai, head, ai_list) { |
149 | if (wbc->nr_to_write <= 0) | 150 | if (wbc->nr_to_write <= 0) |
@@ -151,6 +152,7 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc) | |||
151 | gfs2_ail1_start_one(sdp, wbc, ai); /* This may drop ail lock */ | 152 | gfs2_ail1_start_one(sdp, wbc, ai); /* This may drop ail lock */ |
152 | } | 153 | } |
153 | spin_unlock(&sdp->sd_ail_lock); | 154 | spin_unlock(&sdp->sd_ail_lock); |
155 | trace_gfs2_ail_flush(sdp, wbc, 0); | ||
154 | } | 156 | } |
155 | 157 | ||
156 | /** | 158 | /** |
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h index 9133d0aaac26..5d07609ec57d 100644 --- a/fs/gfs2/trace_gfs2.h +++ b/fs/gfs2/trace_gfs2.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/buffer_head.h> | 10 | #include <linux/buffer_head.h> |
11 | #include <linux/dlmconstants.h> | 11 | #include <linux/dlmconstants.h> |
12 | #include <linux/gfs2_ondisk.h> | 12 | #include <linux/gfs2_ondisk.h> |
13 | #include <linux/writeback.h> | ||
13 | #include "incore.h" | 14 | #include "incore.h" |
14 | #include "glock.h" | 15 | #include "glock.h" |
15 | 16 | ||
@@ -320,6 +321,33 @@ TRACE_EVENT(gfs2_log_blocks, | |||
320 | MINOR(__entry->dev), __entry->blocks) | 321 | MINOR(__entry->dev), __entry->blocks) |
321 | ); | 322 | ); |
322 | 323 | ||
324 | /* Writing back the AIL */ | ||
325 | TRACE_EVENT(gfs2_ail_flush, | ||
326 | |||
327 | TP_PROTO(const struct gfs2_sbd *sdp, const struct writeback_control *wbc, int start), | ||
328 | |||
329 | TP_ARGS(sdp, wbc, start), | ||
330 | |||
331 | TP_STRUCT__entry( | ||
332 | __field( dev_t, dev ) | ||
333 | __field( int, start ) | ||
334 | __field( int, sync_mode ) | ||
335 | __field( long, nr_to_write ) | ||
336 | ), | ||
337 | |||
338 | TP_fast_assign( | ||
339 | __entry->dev = sdp->sd_vfs->s_dev; | ||
340 | __entry->start = start; | ||
341 | __entry->sync_mode = wbc->sync_mode; | ||
342 | __entry->nr_to_write = wbc->nr_to_write; | ||
343 | ), | ||
344 | |||
345 | TP_printk("%u,%u ail flush %s %s %ld", MAJOR(__entry->dev), | ||
346 | MINOR(__entry->dev), __entry->start ? "start" : "end", | ||
347 | __entry->sync_mode == WB_SYNC_ALL ? "all" : "none", | ||
348 | __entry->nr_to_write) | ||
349 | ); | ||
350 | |||
323 | /* Section 3 - bmap | 351 | /* Section 3 - bmap |
324 | * | 352 | * |
325 | * Objectives: | 353 | * Objectives: |