On Fri, 2012-04-20 at 16:52 -0400, Fred Isaman wrote: > On Fri, Apr 20, 2012 at 3:46 PM, Myklebust, Trond > <Trond.Myklebust@xxxxxxxxxx> wrote: > > On Fri, 2012-04-20 at 14:47 -0400, Fred Isaman wrote: > >> 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@xxxxxxxxxx> > >> --- > >> fs/nfs/nfs4filelayout.c | 12 ++++++++++++ > >> fs/nfs/pagelist.c | 2 +- > >> fs/nfs/pnfs.c | 8 ++++++++ > >> 3 files changed, 21 insertions(+), 1 deletions(-) > >> > >> diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c > >> index 5d01a16..b344946 100644 > >> --- a/fs/nfs/pagelist.c > >> +++ b/fs/nfs/pagelist.c > >> @@ -280,7 +280,7 @@ 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)) > >> + if (req_offset(req) != req_offset(prev) + prev->wb_bytes) > > > > Can we micro-optimise this just a teensy bit by moving it until after > > the req->wb_base and prev->wb_base tests? Since those are > > computationally simpler, doing them first might make the "can't > > coalesce" test a little faster. > > > > Sure. Do you want a new v4 submission with just that change? Just resend that 1 patch. I don't think we'll have any conflicts with the rest. -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@xxxxxxxxxx www.netapp.com ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥