From 813a6595c97813a33408d2e11656249d3c02cb49 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Wed, 28 Aug 2013 23:45:32 -0400 Subject: [PATCH] LU-3843 clio: add debug message in osc_completion() Replace LASSERT with LASSERTF in osc_completion, thus we can get more info when the LASSERT is triggered. Signed-off-by: Niu Yawei Change-Id: I1b365050d5c2348b4cdc83f2ea71f36cce7f9456 Reviewed-on: http://review.whamcloud.com/7494 Reviewed-by: Bobi Jam Tested-by: Jenkins Reviewed-by: Jinshan Xiong Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osc/osc_cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 1096d03..4cabaca 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -1263,8 +1263,10 @@ static int osc_completion(const struct lu_env *env, struct osc_async_page *oap, ENTRY; cmd &= ~OBD_BRW_NOQUOTA; - LASSERT(equi(page->cp_state == CPS_PAGEIN, cmd == OBD_BRW_READ)); - LASSERT(equi(page->cp_state == CPS_PAGEOUT, cmd == OBD_BRW_WRITE)); + LASSERTF(equi(page->cp_state == CPS_PAGEIN, cmd == OBD_BRW_READ), + "cp_state:%u, cmd:%d\n", page->cp_state, cmd); + LASSERTF(equi(page->cp_state == CPS_PAGEOUT, cmd == OBD_BRW_WRITE), + "cp_state:%u, cmd:%d\n", page->cp_state, cmd); LASSERT(opg->ops_transfer_pinned); /* -- 1.8.3.1