diff options
author | Venkat Gopalakrishnan <venkatg@codeaurora.org> | 2014-05-01 19:15:23 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:02:00 -0700 |
commit | 014929f975fab25e65776cd2b162e667644ba044 (patch) | |
tree | f85df04da5e15fb1a9dfe763df5b94d393e7fd06 /fs/buffer.c | |
parent | a27d5a2f83bba21a78f45abe63ada896e7b4fc31 (diff) |
block/fs: keep track of the task that dirtied the page
Background writes happen in the context of a background thread.
It is very useful to identify the actual task that generated the
request instead of background task that submited the request.
Hence keep track of the task when a page gets dirtied and dump
this task info while tracing. Not all the pages in the bio are
dirtied by the same task but most likely it will be, since the
sectors accessed on the device must be adjacent.
Change-Id: I6afba85a2063dd3350a0141ba87cf8440ce9f777
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: Fixed trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 4f4cd959da7c..06fc75159808 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -641,6 +641,8 @@ static void __set_page_dirty(struct page *page, struct address_space *mapping, account_page_dirtied(page, mapping, memcg); radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); + /* Save the task that is dirtying this page */ + page->tsk_dirty = current; } spin_unlock_irqrestore(&mapping->tree_lock, flags); } |