NFSv4.1 add nfs_inode book keeping for mdsthreshold
Keep track of the number of bytes read or written via buffered, direct, and mem-mapped i/o for use by mdsthreshold size_io hints. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:

committed by
Trond Myklebust

parent
82be417aa3
commit
2701d086db
@@ -447,6 +447,7 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
|
||||
result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos);
|
||||
if (!result)
|
||||
result = nfs_direct_wait(dreq);
|
||||
NFS_I(inode)->read_io += result;
|
||||
out_release:
|
||||
nfs_direct_req_release(dreq);
|
||||
out:
|
||||
@@ -785,6 +786,7 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
|
||||
pos += vec->iov_len;
|
||||
}
|
||||
nfs_pageio_complete(&desc);
|
||||
NFS_I(dreq->inode)->write_io += desc.pg_bytes_written;
|
||||
|
||||
/*
|
||||
* If no bytes were started, return the error, and let the
|
||||
|
Reference in New Issue
Block a user