From f52eb69075e6757104c77766d1d67c028a4e3506 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Mon, 4 Jun 2012 21:32:02 -0700 Subject: [PATCH] LU-1421 clio: check cp_owner of cl_page after the page is owned After page writeback is supported in clio, there exists a short period that page is unlocked but cp_owner is set. This confuses the assertion of cl_page_assume(). This problem can be fixed by checking cp_owner after the page is owned. Signed-off-by: Jinshan Xiong Change-Id: Iafcdbb9b0dbb5f081a84c1da1b7ad8051d406988 Reviewed-on: http://review.whamcloud.com/3027 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin --- lustre/obdclass/cl_page.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index c283b9a..217ee00 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -1023,15 +1023,14 @@ EXPORT_SYMBOL(cl_page_own_try); void cl_page_assume(const struct lu_env *env, struct cl_io *io, struct cl_page *pg) { - PASSERT(env, pg, pg->cp_owner == NULL); PINVRNT(env, pg, cl_object_same(pg->cp_obj, io->ci_obj)); - PINVRNT(env, pg, cl_page_invariant(pg)); ENTRY; pg = cl_page_top(pg); io = cl_io_top(io); cl_page_invoid(env, io, pg, CL_PAGE_OP(cpo_assume)); + PASSERT(env, pg, pg->cp_owner == NULL); pg->cp_owner = io; pg->cp_task = current; cl_page_owner_set(pg); -- 1.8.3.1