-
Notifications
You must be signed in to change notification settings - Fork 0
/
io-stat-0006-account-data-of-buffer-write.patch
41 lines (35 loc) · 1.37 KB
/
io-stat-0006-account-data-of-buffer-write.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Subject: [PATCH v4 6/8] ext4: account the data request of write operations in buffered io
From: Zheng Liu <[email protected]>
We call ext4_ios_write() function to account the data request of write in
buffered io.
CC: Jens Axboe <[email protected]>
CC: Steven Whitehouse <[email protected]>
CC: Aditya Kali <[email protected]>
Signed-off-by: Wang Shaoyan <[email protected]>
Signed-off-by: Zheng Liu <[email protected]>
---
fs/ext4/inode.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 176977a..cfebc6d 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1910,6 +1910,8 @@ static int ext4_writepage(struct page *page,
struct inode *inode = page->mapping->host;
trace_ext4_writepage(page);
+ ext4_ios_write(inode->i_sb, NULL, NULL, EXT4_IOS_REGULAR_DATA,
+ ext4_blocks_per_page(inode));
size = i_size_read(inode);
if (page->index == size >> PAGE_CACHE_SHIFT)
len = size & ~PAGE_CACHE_MASK;
@@ -2084,6 +2086,9 @@ static int write_cache_pages_da(struct address_space *mapping,
logical = (sector_t) page->index <<
(PAGE_CACHE_SHIFT - inode->i_blkbits);
+ ext4_ios_write(inode->i_sb, NULL, NULL,
+ EXT4_IOS_REGULAR_DATA,
+ ext4_blocks_per_page(inode));
if (!page_has_buffers(page)) {
mpage_add_bh_to_extent(mpd, logical,
PAGE_CACHE_SIZE,
--
1.7.4.1