diff options
author | Weston Andros Adamson <dros@primarydata.com> | 2014-05-15 11:56:44 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-05-29 11:11:44 -0400 |
commit | ab75e417192a486ffe63a314b6d2e7361f0e157f (patch) | |
tree | 5bf3e9884f75e789aa1db33edb68103ad1f2c7fc /fs/nfs/nfs4filelayout.c | |
parent | b4fdac1a5150174df0847a45dc6612ce5ce3daeb (diff) | |
download | linux-ab75e417192a486ffe63a314b6d2e7361f0e157f.tar.gz linux-ab75e417192a486ffe63a314b6d2e7361f0e157f.tar.bz2 linux-ab75e417192a486ffe63a314b6d2e7361f0e157f.zip |
nfs: call nfs_can_coalesce_requests for every req
Call nfs_can_coalesce_requests for every request, even the first one.
This is needed for future patches to give pg_test a way to inform
add_request to reduce the size of the request.
Now @prev can be null in nfs_can_coalesce_requests and pg_test functions.
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index ba9a9aadf6c8..9319427e43e3 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -929,6 +929,9 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev, !nfs_generic_pg_test(pgio, prev, req)) return 0; + if (!prev) + return req->wb_bytes; + p_stripe = (u64)req_offset(prev); r_stripe = (u64)req_offset(req); stripe_unit = FILELAYOUT_LSEG(pgio->pg_lseg)->stripe_unit; |