Comments
Patch
@@ -2680,6 +2680,8 @@ static sector_t ext4_bmap(struct address_space *mapping, sector_t block)
static int ext4_readpage(struct file *file, struct page *page)
{
trace_ext4_readpage(page);
+ __ext4_io_stat(READ, EXT4_IOS_REGULAR_DATA,
+ ext4_blocks_per_page(page->mapping->host));
return mpage_readpage(page, ext4_get_block);
}
@@ -2687,6 +2689,8 @@ static int
ext4_readpages(struct file *file, struct address_space *mapping,
struct list_head *pages, unsigned nr_pages)
{
+ __ext4_io_stat(READ, EXT4_IOS_REGULAR_DATA,
+ nr_pages * ext4_blocks_per_page(mapping->host));
return mpage_readpages(mapping, pages, nr_pages, ext4_get_block);
}
@@ -3305,6 +3309,8 @@ int ext4_discard_partial_page_buffers_no_lock(handle_t *handle,
err = -EIO;
ll_rw_block(READ, 1, &bh);
wait_on_buffer(bh);
+ ext4_ios_read(bh, EXT4_IOS_REGULAR_DATA,
+ ext4_blocks_per_page(inode));
/* Uhhuh. Read error. Complain and punt.*/
if (!buffer_uptodate(bh))
goto next;