diff options
author | Fred Isaman <iisaman@netapp.com> | 2012-04-20 19:55:31 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-27 14:10:38 -0400 |
commit | 1825a0d08f22463e5a8f4b1636473efd057a3479 (patch) | |
tree | b010b2bbb71431802cb1714483b69060ce09ff39 /fs/nfs/pagelist.c | |
parent | 9533da2979757258d3fd5429d830a297013d69ed (diff) | |
download | op-kernel-dev-1825a0d08f22463e5a8f4b1636473efd057a3479.zip op-kernel-dev-1825a0d08f22463e5a8f4b1636473efd057a3479.tar.gz |
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 5d01a16..638ca7f 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); } |