NFS: Use the nfs_pageio_descriptor->pg_bsize in the read/write request
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 12 Jul 2011 17:42:02 +0000 (13:42 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 15 Jul 2011 13:12:20 +0000 (09:12 -0400)
Instead of looking up the rsize and wsize, the routines that generate the
RPC requests should really be using the pg_bsize, since that is what we
use when deciding whether or not to coalesce write requests...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/read.c
fs/nfs/write.c

index c14362fbe65f94e7b0f6c80b25c6801d01205115..75088f58183be974981b4e5b851e48281f3f0ef9 100644 (file)
@@ -303,7 +303,7 @@ static int nfs_pagein_multi(struct nfs_pageio_descriptor *desc, struct list_head
        struct nfs_page *req = nfs_list_entry(desc->pg_list.next);
        struct page *page = req->wb_page;
        struct nfs_read_data *data;
-       size_t rsize = NFS_SERVER(desc->pg_inode)->rsize, nbytes;
+       size_t rsize = desc->pg_bsize, nbytes;
        unsigned int offset;
        int requests = 0;
        int ret = 0;
index 71fbba72ace3588fea4db68837afa679f203cc44..c88a1ab42c391657418f9dab30e1547fb97ccfe6 100644 (file)
@@ -946,7 +946,7 @@ static int nfs_flush_multi(struct nfs_pageio_descriptor *desc, struct list_head
        struct nfs_page *req = nfs_list_entry(desc->pg_list.next);
        struct page *page = req->wb_page;
        struct nfs_write_data *data;
-       size_t wsize = NFS_SERVER(desc->pg_inode)->wsize, nbytes;
+       size_t wsize = desc->pg_bsize, nbytes;
        unsigned int offset;
        int requests = 0;
        int ret = 0;