From 07146e09be0478b4f8293ed7065b2722c85b1659 Mon Sep 17 00:00:00 2001 From: Jeremy Filizetti Date: Sun, 13 Dec 2015 23:39:11 -0500 Subject: [PATCH] LU-3289 osp: osp_precreate_thread does not check for errors If servers do not have a valid key for GSS the call to osp_statfs_update() can fail. This patch breaks the loop in the event of a failure from osp_statfs_update(). Signed-off-by: Jeremy Filizetti Change-Id: I576cff86d285c4263e8d98cccb9b3c6943af6f75 Reviewed-on: http://review.whamcloud.com/17598 Tested-by: Jenkins Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osp/osp_precreate.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index fe63a55..b723731 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -1084,6 +1084,8 @@ static int osp_precreate_thread(void *_arg) struct osp_device *d = _arg; struct ptlrpc_thread *thread = &d->opd_pre_thread; struct l_wait_info lwi = { 0 }; + struct l_wait_info lwi2 = LWI_TIMEOUT(cfs_time_seconds(5), + back_to_sleep, NULL); struct lu_env env; int rc; @@ -1137,7 +1139,11 @@ static int osp_precreate_thread(void *_arg) continue; } - osp_statfs_update(d); + if (osp_statfs_update(d)) { + l_wait_event(d->opd_pre_waitq, + !osp_precreate_running(d), &lwi2); + continue; + } /* * Clean up orphans or recreate missing objects. @@ -1164,7 +1170,8 @@ static int osp_precreate_thread(void *_arg) break; if (osp_statfs_need_update(d)) - osp_statfs_update(d); + if (osp_statfs_update(d)) + break; /* To avoid handling different seq in precreate/orphan * cleanup, it will hold precreate until current seq is -- 1.8.3.1