mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
dax: add tracepoints to dax_writeback_mapping_range()
Add tracepoints to dax_writeback_mapping_range(), following the same logging conventions as the rest of DAX. Here is an example writeback call: msync-1085 [006] .... 200.902565: dax_writeback_range: dev 259:0 ino 0x1003 pgoff 0x200-0x2ff msync-1085 [006] .... 200.902579: dax_writeback_range_done: dev 259:0 ino 0x1003 pgoff 0x200-0x2ff [[email protected]: fix regression in dax_writeback_mapping_range()] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ross Zwisler <[email protected]> Reviewed-by: Jan Kara <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Dan Williams <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Steven Rostedt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
678c9fd043
commit
d14a3f48a1
2 changed files with 39 additions and 5 deletions
12
fs/dax.c
12
fs/dax.c
|
|
@ -863,6 +863,8 @@ int dax_writeback_mapping_range(struct address_space *mapping,
|
|||
start_index = wbc->range_start >> PAGE_SHIFT;
|
||||
end_index = wbc->range_end >> PAGE_SHIFT;
|
||||
|
||||
trace_dax_writeback_range(inode, start_index, end_index);
|
||||
|
||||
tag_pages_for_writeback(mapping, start_index, end_index);
|
||||
|
||||
pagevec_init(&pvec, 0);
|
||||
|
|
@ -882,14 +884,14 @@ int dax_writeback_mapping_range(struct address_space *mapping,
|
|||
|
||||
ret = dax_writeback_one(bdev, dax_dev, mapping,
|
||||
indices[i], pvec.pages[i]);
|
||||
if (ret < 0) {
|
||||
put_dax(dax_dev);
|
||||
return ret;
|
||||
}
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
out:
|
||||
put_dax(dax_dev);
|
||||
return 0;
|
||||
trace_dax_writeback_range_done(inode, start_index, end_index);
|
||||
return (ret < 0 ? ret : 0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dax_writeback_mapping_range);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue