From b0ae46fcfe1eff2c5ce86956237f62ea4d4bd7f2 Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 12 Nov 2008 21:00:37 +0000 Subject: [PATCH] vvp: always write page from the beginning: sptlrpc depends on kiov_offset being 0. --- lustre/llite/vvp_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/llite/vvp_io.c b/lustre/llite/vvp_io.c index 30eae91..aa2dcf0 100644 --- a/lustre/llite/vvp_io.c +++ b/lustre/llite/vvp_io.c @@ -701,7 +701,7 @@ static int vvp_io_read_page(const struct lu_env *env, static int vvp_page_sync_io(const struct lu_env *env, struct cl_io *io, struct cl_page *page, struct ccc_page *cp, - int from, int to, enum cl_req_type crt) + int to, enum cl_req_type crt) { struct cl_2queue *queue; struct ccc_object *cobo = cl2ccc(page->cp_obj); @@ -722,7 +722,7 @@ static int vvp_page_sync_io(const struct lu_env *env, struct cl_io *io, cl_sync_io_init(anchor, 1); cp->cpg_sync_io = anchor; - cl_page_clip(env, page, from, to); + cl_page_clip(env, page, 0, to); result = cl_io_submit_rw(env, io, crt, queue); if (result == 0) result = cl_sync_io_wait(env, io, &queue->c2_qout, anchor); @@ -772,7 +772,7 @@ static int vvp_io_prepare_partial(const struct lu_env *env, struct cl_io *io, cp->cpg_ra_used = 1; else result = vvp_page_sync_io(env, io, pg, cp, - 0, CFS_PAGE_SIZE, CRT_READ); + CFS_PAGE_SIZE, CRT_READ); /* * In older implementations, obdo_refresh_inode is called here * to update the inode because the write might modify the @@ -889,7 +889,7 @@ static int vvp_io_commit_write(const struct lu_env *env, * being. */ result = vvp_page_sync_io(env, io, pg, cp, - from, to, CRT_WRITE); + to, CRT_WRITE); } else { tallyop = LPROC_LL_DIRTY_HITS; result = 0; -- 1.8.3.1