From 23703fef075ceb066785f2da46e1c8f1cad62467 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Fri, 19 Oct 2012 09:50:52 -0700 Subject: [PATCH] LU-2179 osc: truncate partial page correctly Debug patch for osc_extent_wait() is not good because it will hit LBUG in case the OST is in recovery. In the new patch, it will wait again after printing an error message. Signed-off-by: Jinshan Xiong Change-Id: I53b5d8e335b1d4a4e57abf2964c10d7cb1ef7783 Reviewed-on: http://review.whamcloud.com/4311 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Tested-by: Hudson Tested-by: Maloo --- lustre/osc/osc_cache.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 38b164d..96d228f 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -888,8 +888,13 @@ static int osc_extent_wait(const struct lu_env *env, struct osc_extent *ext, /* wait for the extent until its state becomes @state */ rc = l_wait_event(ext->oe_waitq, extent_wait_cb(ext, state), &lwi); if (rc == -ETIMEDOUT) { - OSC_EXTENT_DUMP(D_ERROR, ext, "wait ext %d timedout\n", state); - LBUG(); + OSC_EXTENT_DUMP(D_ERROR, ext, + "%s: wait ext to %d timedout, recovery in progress?\n", + osc_export(obj)->exp_obd->obd_name, state); + + lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL); + rc = l_wait_event(ext->oe_waitq, extent_wait_cb(ext, state), + &lwi); } if (rc == 0 && ext->oe_rc < 0) rc = ext->oe_rc; -- 1.8.3.1