From 7d5162ed2ce75238121a05f26c3ffca529adb0ea Mon Sep 17 00:00:00 2001 From: Curt Wohlgemuth Date: Fri, 7 Oct 2011 21:51:56 -0600 Subject: [PATCH] --- yaml --- r: 274367 b: refs/heads/master c: ad4e38dd6a33bb3a4882c487d7abe621e583b982 h: refs/heads/master i: 274365: 8a0c5f43b0c24b7733aa19e1df5b4a338d9c9d98 274363: 6867abf2a6c7f1b13ccfd59f5c65da764fdf11bc 274359: fcd09d5d8188c6d58c1aafd707c34a6d359e5241 274351: 163ace84642f2f929c2221802f083f6d16bbf77a 274335: 374cf7f8c46b24876015000810824c7ef25bb5b2 274303: 4a74109033ea461778a02e8ca899575bd3b826f3 v: v3 --- [refs] | 2 +- trunk/fs/fs-writeback.c | 16 ++++++++-------- trunk/include/trace/events/writeback.h | 5 +++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index a5dedc91034d..441725c127a2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ece13ac31bbe492d940ba0bc4ade2ae1521f46a5 +refs/heads/master: ad4e38dd6a33bb3a4882c487d7abe621e583b982 diff --git a/trunk/fs/fs-writeback.c b/trunk/fs/fs-writeback.c index 6401cd76f109..c51029693600 100644 --- a/trunk/fs/fs-writeback.c +++ b/trunk/fs/fs-writeback.c @@ -251,7 +251,7 @@ static bool inode_dirtied_after(struct inode *inode, unsigned long t) */ static int move_expired_inodes(struct list_head *delaying_queue, struct list_head *dispatch_queue, - unsigned long *older_than_this) + struct wb_writeback_work *work) { LIST_HEAD(tmp); struct list_head *pos, *node; @@ -262,8 +262,8 @@ static int move_expired_inodes(struct list_head *delaying_queue, while (!list_empty(delaying_queue)) { inode = wb_inode(delaying_queue->prev); - if (older_than_this && - inode_dirtied_after(inode, *older_than_this)) + if (work->older_than_this && + inode_dirtied_after(inode, *work->older_than_this)) break; if (sb && sb != inode->i_sb) do_sb_sort = 1; @@ -302,13 +302,13 @@ static int move_expired_inodes(struct list_head *delaying_queue, * | * +--> dequeue for IO */ -static void queue_io(struct bdi_writeback *wb, unsigned long *older_than_this) +static void queue_io(struct bdi_writeback *wb, struct wb_writeback_work *work) { int moved; assert_spin_locked(&wb->list_lock); list_splice_init(&wb->b_more_io, &wb->b_io); - moved = move_expired_inodes(&wb->b_dirty, &wb->b_io, older_than_this); - trace_writeback_queue_io(wb, older_than_this, moved); + moved = move_expired_inodes(&wb->b_dirty, &wb->b_io, work); + trace_writeback_queue_io(wb, work, moved); } static int write_inode(struct inode *inode, struct writeback_control *wbc) @@ -651,7 +651,7 @@ long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages) spin_lock(&wb->list_lock); if (list_empty(&wb->b_io)) - queue_io(wb, NULL); + queue_io(wb, &work); __writeback_inodes_wb(wb, &work); spin_unlock(&wb->list_lock); @@ -745,7 +745,7 @@ static long wb_writeback(struct bdi_writeback *wb, trace_writeback_start(wb->bdi, work); if (list_empty(&wb->b_io)) - queue_io(wb, work->older_than_this); + queue_io(wb, work); if (work->sb) progress = writeback_sb_inodes(work->sb, wb, work); else diff --git a/trunk/include/trace/events/writeback.h b/trunk/include/trace/events/writeback.h index 0ce9f06f58c2..1261db3916cc 100644 --- a/trunk/include/trace/events/writeback.h +++ b/trunk/include/trace/events/writeback.h @@ -157,9 +157,9 @@ DEFINE_WBC_EVENT(wbc_writepage); TRACE_EVENT(writeback_queue_io, TP_PROTO(struct bdi_writeback *wb, - unsigned long *older_than_this, + struct wb_writeback_work *work, int moved), - TP_ARGS(wb, older_than_this, moved), + TP_ARGS(wb, work, moved), TP_STRUCT__entry( __array(char, name, 32) __field(unsigned long, older) @@ -167,6 +167,7 @@ TRACE_EVENT(writeback_queue_io, __field(int, moved) ), TP_fast_assign( + unsigned long *older_than_this = work->older_than_this; strncpy(__entry->name, dev_name(wb->bdi->dev), 32); __entry->older = older_than_this ? *older_than_this : 0; __entry->age = older_than_this ?