X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosc%2Fosc_cache.c;h=795040d9ca2881261fbb983d072ea9c337960429;hp=e2b971d69dce373b536ec69adc5836b3f70cfa9e;hb=9821754235e2417868dbaeb987b33e22c517346f;hpb=5fb29cd1e77ca7bee34791138b49f5dd50d5116b diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index e2b971d6..795040d 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -2323,7 +2323,7 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io, oap->oap_cmd = cmd; oap->oap_page_off = ops->ops_from; - oap->oap_count = ops->ops_to - ops->ops_from; + oap->oap_count = ops->ops_to - ops->ops_from + 1; /* No need to hold a lock here, * since this page is not in any list yet. */ oap->oap_async_flags = 0; @@ -2584,7 +2584,8 @@ int osc_queue_sync_pages(const struct lu_env *env, const struct cl_io *io, ++page_count; mppr <<= (page_count > mppr); - if (unlikely(opg->ops_from > 0 || opg->ops_to < PAGE_SIZE)) + if (unlikely(opg->ops_from > 0 || + opg->ops_to < PAGE_SIZE - 1)) can_merge = false; }