From 53d2f414d75ac1302b53017376ca2f1fda1f3d17 Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Fri, 29 Apr 2016 00:53:09 +0800 Subject: [PATCH] LU-6696 llog: improve error handling Handle error return value of llog_cat_process() in osp_sync_thread(). Signed-off-by: Bobi Jam Change-Id: I9b8e00dcc90e8d7d55648ce1b3a18af0a74c542b Reviewed-on: http://review.whamcloud.com/19856 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Mike Pershin --- lustre/osp/osp_sync.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lustre/osp/osp_sync.c b/lustre/osp/osp_sync.c index 2fcc9e5..c44ab5b 100644 --- a/lustre/osp/osp_sync.c +++ b/lustre/osp/osp_sync.c @@ -1195,6 +1195,11 @@ static int osp_sync_thread(void *_arg) } rc = llog_cat_process(&env, llh, osp_sync_process_queues, d, 0, 0); + if (rc < 0) { + CERROR("%s: llog process with osp_sync_process_queues " + "failed: %d\n", d->opd_obd->obd_name, rc); + GOTO(close, rc); + } LASSERTF(rc == 0 || rc == LLOG_PROC_BREAK, "%u changes, %u in progress, %u in flight: %d\n", atomic_read(&d->opd_syn_changes), @@ -1227,6 +1232,7 @@ static int osp_sync_thread(void *_arg) } +close: llog_cat_close(&env, llh); rc = llog_cleanup(&env, ctxt); if (rc) -- 1.8.3.1