From 014929f975fab25e65776cd2b162e667644ba044 Mon Sep 17 00:00:00 2001 From: Venkat Gopalakrishnan Date: Thu, 1 May 2014 19:15:23 -0700 Subject: 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: Fixed trivial merge conflicts] Signed-off-by: Venkat Gopalakrishnan --- include/linux/mm_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 0a732c5e0de1..9751b9354d61 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -207,6 +207,8 @@ struct page { not kmapped, ie. highmem) */ #endif /* WANT_PAGE_VIRTUAL */ + struct task_struct *tsk_dirty; /* task that sets this page dirty */ + #ifdef CONFIG_KMEMCHECK /* * kmemcheck wants to track the status of each byte in a page; this -- cgit v1.2.3