Whamcloud - gitweb
LU-5306: Update download and other whamcloud URLs
[fs/lustre-release.git] / lustre / ofd / ofd_obd.c
index 8ba5eca..cd14949 100644 (file)
@@ -127,7 +127,7 @@ static int ofd_parse_connect_data(const struct lu_env *env,
                CWARN("!!! This export (nid %s) used object group %d "
                      "earlier; now it's trying to use group %d!  This could "
                      "be a bug in the MDS. Please report to "
-                     "http://bugs.whamcloud.com/\n",
+                     "https://jira.hpdd.intel.com/\n",
                      obd_export_nid2str(exp), fed->fed_group,
                      data->ocd_group);
                RETURN(-EPROTO);
@@ -312,7 +312,7 @@ out:
 
 int ofd_obd_disconnect(struct obd_export *exp)
 {
-       struct ofd_device       *ofd = ofd_dev(exp->exp_obd->obd_lu_dev);
+       struct ofd_device       *ofd = ofd_exp(exp);
        struct lu_env            env;
        int                      rc;
 
@@ -370,7 +370,7 @@ static int ofd_init_export(struct obd_export *exp)
 
 static int ofd_destroy_export(struct obd_export *exp)
 {
-       struct ofd_device *ofd = ofd_dev(exp->exp_obd->obd_lu_dev);
+       struct ofd_device *ofd = ofd_exp(exp);
 
        if (exp->exp_filter_data.fed_pending)
                CERROR("%s: cli %s/%p has %lu pending on destroyed export"
@@ -410,8 +410,18 @@ static int ofd_destroy_export(struct obd_export *exp)
 int ofd_postrecov(const struct lu_env *env, struct ofd_device *ofd)
 {
        struct lu_device *ldev = &ofd->ofd_dt_dev.dd_lu_dev;
+       struct lfsck_start_param lsp;
+       int rc;
+
+       CDEBUG(D_HA, "%s: recovery is over\n", ofd_name(ofd));
+
+       lsp.lsp_start = NULL;
+       lsp.lsp_index_valid = 0;
+       rc = lfsck_start(env, ofd->ofd_osd, &lsp);
+       if (rc != 0 && rc != -EALREADY)
+               CWARN("%s: auto trigger paused LFSCK failed: rc = %d\n",
+                     ofd_name(ofd), rc);
 
-       CDEBUG(D_HA, "%s: recovery is over\n", ofd_obd(ofd)->obd_name);
        return ldev->ld_ops->ldo_recovery_complete(env, ldev);
 }
 
@@ -596,7 +606,7 @@ int ofd_statfs(const struct lu_env *env,  struct obd_export *exp,
               struct obd_statfs *osfs, __u64 max_age, __u32 flags)
 {
         struct obd_device      *obd = class_exp2obd(exp);
-       struct ofd_device       *ofd = ofd_dev(exp->exp_obd->obd_lu_dev);
+       struct ofd_device       *ofd = ofd_exp(exp);
        int                      rc;
 
        ENTRY;
@@ -735,7 +745,7 @@ out:
                 * for 2nd lu_object_find() waiting for the first reference
                 * to go... deadlock! */
                res = ldlm_resource_get(ns, NULL, &info->fti_resid, LDLM_EXTENT, 0);
-               if (res != NULL) {
+               if (!IS_ERR(res)) {
                        ldlm_res_lvbo_update(res, NULL, 0);
                        ldlm_resource_putref(res);
                }