mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] io-accounting: direct-io
Account for direct-io. Cc: Jay Lan <[email protected]> Cc: Shailabh Nagar <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Chris Sturtivant <[email protected]> Cc: Tony Ernst <[email protected]> Cc: Guillaume Thouvenin <[email protected]> Cc: David Wright <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6f88cc2e9c
commit
98c4d57dec
1 changed files with 8 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/task_io_accounting_ops.h>
|
||||
#include <linux/bio.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/err.h>
|
||||
|
|
@ -675,6 +676,13 @@ submit_page_section(struct dio *dio, struct page *page,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (dio->rw & WRITE) {
|
||||
/*
|
||||
* Read accounting is performed in submit_bio()
|
||||
*/
|
||||
task_io_account_write(len);
|
||||
}
|
||||
|
||||
/*
|
||||
* Can we just grow the current page's presence in the dio?
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue