[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1320921294-30321-7-git-send-email-wenqing.lz@taobao.com>
Date: Thu, 10 Nov 2011 18:34:52 +0800
From: Zheng Liu <gnehzuil.liu@...il.com>
To: linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc: Zheng Liu <wenqing.lz@...bao.com>,
Wang Shaoyan <wangshaoyan.pt@...bao.com>
Subject: [PATCH v2 6/8] ext4: Count data request of write operations in buffered io
From: Zheng Liu <wenqing.lz@...bao.com>
'Issue' flag in buffer_head doesn't be used.
Signed-off-by: Zheng Liu <wenqing.lz@...bao.com>
Signed-off-by: Wang Shaoyan <wangshaoyan.pt@...bao.com>
---
fs/ext4/inode.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index c584f89..e552fb2 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1907,6 +1907,8 @@ static int ext4_writepage(struct page *page,
struct inode *inode = page->mapping->host;
trace_ext4_writepage(page);
+ __ext4_io_stat(WRITE, 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;
@@ -2081,6 +2083,8 @@ static int write_cache_pages_da(struct address_space *mapping,
logical = (sector_t) page->index <<
(PAGE_CACHE_SHIFT - inode->i_blkbits);
+ __ext4_io_stat(WRITE, EXT4_IOS_REGULAR_DATA,
+ ext4_blocks_per_page(inode));
if (!page_has_buffers(page)) {
mpage_add_bh_to_extent(mpd, logical,
PAGE_CACHE_SIZE,
@@ -3454,8 +3458,10 @@ int ext4_block_zero_page_range(handle_t *handle,
err = 0;
if (ext4_should_journal_data(inode)) {
err = ext4_handle_dirty_metadata(handle, inode, bh);
- } else
+ } else {
+ ext4_ios_write_one(handle, bh, EXT4_IOS_REGULAR_DATA);
mark_buffer_dirty(bh);
+ }
unlock:
unlock_page(page);
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists