Whamcloud - gitweb
ORNL-28 recovery: rework extend_recovery_timer()
[fs/lustre-release.git] / lustre / mdt / mdt_handler.c
index 58220e5..e94ade4 100644 (file)
@@ -4504,14 +4504,8 @@ static int mdt_init0(const struct lu_env *env, struct mdt_device *m,
                         CERROR("CMD Operation not allowed in IOP mode\n");
                         GOTO(err_lmi, rc = -EINVAL);
                 }
-                /* Read recovery timeouts */
-                if (lsi->lsi_lmd && lsi->lsi_lmd->lmd_recovery_time_soft)
-                        obd->obd_recovery_timeout =
-                                lsi->lsi_lmd->lmd_recovery_time_soft;
 
-                if (lsi->lsi_lmd && lsi->lsi_lmd->lmd_recovery_time_hard)
-                        obd->obd_recovery_time_hard =
-                                lsi->lsi_lmd->lmd_recovery_time_hard;
+                obd->u.obt.obt_magic = OBT_MAGIC;
         }
 
         cfs_rwlock_init(&m->mdt_sptlrpc_lock);
@@ -4728,15 +4722,21 @@ static int mdt_process_config(const struct lu_env *env,
 
                 /*
                  * For interoperability between 1.8 and 2.0,
-                 * skip old "mdt.group_upcall" param.
                  */
                 {
+                        /* Skip old "mdt.group_upcall" param. */
                         char *param = lustre_cfg_string(cfg, 1);
                         if (param && !strncmp("mdt.group_upcall", param, 16)) {
                                 CWARN("For 1.8 interoperability, skip this"
                                        " mdt.group_upcall. It is obsolete\n");
                                 break;
                         }
+                        /* Rename old "mdt.quota_type" to "mdd.quota_type. */
+                        if (param && !strncmp("mdt.quota_type", param, 14)) {
+                                CWARN("Found old param mdt.quota_type, changed"
+                                      " it to mdd.quota_type.\n");
+                                param[2] = 'd';
+                        }
                 }
 
                 lprocfs_mdt_init_vars(&lvars);
@@ -5294,11 +5294,11 @@ static int mdt_upcall(const struct lu_env *env, struct md_device *md,
         RETURN(rc);
 }
 
-static int mdt_obd_notify(struct obd_device *host,
+static int mdt_obd_notify(struct obd_device *obd,
                           struct obd_device *watched,
                           enum obd_notify_event ev, void *data)
 {
-        struct mdt_device *mdt = mdt_dev(host->obd_lu_dev);
+        struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
 #ifdef HAVE_QUOTA_SUPPORT
         struct md_device *next = mdt->mdt_child;
 #endif
@@ -5456,6 +5456,7 @@ static int mdt_ioc_version_get(struct mdt_thread_info *mti, void *karg)
         struct mdt_lock_handle  *lh;
         int rc;
         ENTRY;
+
         CDEBUG(D_IOCTL, "getting version for "DFID"\n", PFID(fid));
         if (!fid_is_sane(fid))
                 RETURN(-EINVAL);
@@ -5475,6 +5476,9 @@ static int mdt_ioc_version_get(struct mdt_thread_info *mti, void *karg)
                  * fid, this is error to find remote object here
                  */
                 CERROR("nonlocal object "DFID"\n", PFID(fid));
+        } else if (rc == 0) {
+                 *(__u64 *)data->ioc_inlbuf2 = ENOENT_VERSION;
+                rc = -ENOENT;
         } else {
                 version = mo_version_get(mti->mti_env, mdt_object_child(obj));
                *(__u64 *)data->ioc_inlbuf2 = version;