Whamcloud - gitweb
LU-3289 osp: osp_precreate_thread does not check for errors 98/17598/14
authorJeremy Filizetti <jeremy.filizetti@gmail.com>
Mon, 14 Dec 2015 04:39:11 +0000 (23:39 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 13 Jun 2016 17:15:10 +0000 (17:15 +0000)
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 <jeremy.filizetti@gmail.com>
Change-Id: I576cff86d285c4263e8d98cccb9b3c6943af6f75
Reviewed-on: http://review.whamcloud.com/17598
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osp/osp_precreate.c

index fe63a55..b723731 100644 (file)
@@ -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 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;
 
        struct lu_env            env;
        int                      rc;
 
@@ -1137,7 +1139,11 @@ static int osp_precreate_thread(void *_arg)
                        continue;
                }
 
                        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.
 
                /*
                 * 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))
                                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
 
                        /* To avoid handling different seq in precreate/orphan
                         * cleanup, it will hold precreate until current seq is