Commit 6f88cc2e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] io-accounting-read-accounting cifs fix

CIFS implements ->readpages and doesn't use read_cache_pages().  So wire the
read IO accounting up within CIFS.

Cc: Jay Lan <jlan@sgi.com>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Chris Sturtivant <csturtiv@sgi.com>
Cc: Tony Ernst <tee@sgi.com>
Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Wright <daw@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8bde37f0
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/pagevec.h> #include <linux/pagevec.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/writeback.h> #include <linux/writeback.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/div64.h> #include <asm/div64.h>
#include "cifsfs.h" #include "cifsfs.h"
...@@ -1812,6 +1813,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, ...@@ -1812,6 +1813,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
cFYI(1, ("Read error in readpages: %d", rc)); cFYI(1, ("Read error in readpages: %d", rc));
break; break;
} else if (bytes_read > 0) { } else if (bytes_read > 0) {
task_io_account_read(bytes_read);
pSMBr = (struct smb_com_read_rsp *)smb_read_data; pSMBr = (struct smb_com_read_rsp *)smb_read_data;
cifs_copy_cache_pages(mapping, page_list, bytes_read, cifs_copy_cache_pages(mapping, page_list, bytes_read,
smb_read_data + 4 /* RFC1001 hdr */ + smb_read_data + 4 /* RFC1001 hdr */ +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment