diff options
author | Fred Isaman <iisaman@netapp.com> | 2012-04-21 01:55:31 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-27 20:10:38 +0200 |
commit | 1825a0d08f22463e5a8f4b1636473efd057a3479 (patch) | |
tree | b010b2bbb71431802cb1714483b69060ce09ff39 /fs/nfs/pagelist.c | |
parent | NFS: remove unused wb_complete field from struct nfs_page (diff) | |
download | linux-1825a0d08f22463e5a8f4b1636473efd057a3479.tar.xz linux-1825a0d08f22463e5a8f4b1636473efd057a3479.zip |
NFS: prepare coalesce testing for directio
The coalesce code made assumptions that will no longer be true once
non-page aligned io occurs. This introduces no change in
current behavior, but allows for more general situations to come.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 5d01a1651084..638ca7f5a1e4 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -280,12 +280,12 @@ static bool nfs_can_coalesce_requests(struct nfs_page *prev, return false; if (req->wb_context->state != prev->wb_context->state) return false; - if (req->wb_index != (prev->wb_index + 1)) - return false; if (req->wb_pgbase != 0) return false; if (prev->wb_pgbase + prev->wb_bytes != PAGE_CACHE_SIZE) return false; + if (req_offset(req) != req_offset(prev) + prev->wb_bytes) + return false; return pgio->pg_ops->pg_test(pgio, prev, req); } |