Whamcloud - gitweb
LU-5867 lfsck: Enable --create_mdtobj flag 78/12578/5
authorJames Nunez <james.a.nunez@intel.com>
Tue, 9 Sep 2014 18:53:42 +0000 (02:53 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 3 Dec 2014 02:27:52 +0000 (02:27 +0000)
Using the --create_mdtobj flag in 'lctl lfsck_start'
creates an error. "create_mdtobj" is added to the
option struct so it will be recognized as a valid option.

When displaying the results of LFSCK, "create_mdtobj" is
not listed as a parameter. "create_mdtobj" is added to
the lfsck_param_names array so it will be printed when
used.

Also, added LSV_CREATE_MDTOBJ to the lfsck_request
valid options/flags.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I1923bb9a71958b390b9abea248b328ac59c3caad
Reviewed-on: http://review.whamcloud.com/12578
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lfsck/lfsck_engine.c
lustre/lfsck/lfsck_lib.c
lustre/utils/lustre_lfsck.c

index 3c98c2b..74aa59b 100644 (file)
@@ -1289,7 +1289,7 @@ out:
 }
 
 /**
- * Notify the LFSCK event to the instatnces on remote servers.
+ * Notify the LFSCK event to the instances on remote servers.
  *
  * The LFSCK assistant thread notifies the LFSCK instances on other
  * servers (MDT/OST) about some events, such as start new scanning,
@@ -1335,8 +1335,7 @@ static int lfsck_assistant_notify_others(const struct lu_env *env,
                if (com->lc_type != LFSCK_TYPE_LAYOUT)
                        goto next;
 
-               lr->lr_valid = LSV_SPEED_LIMIT | LSV_ERROR_HANDLE | LSV_DRYRUN |
-                              LSV_ASYNC_WINDOWS | LSV_CREATE_OSTOBJ;
+               lr->lr_valid = LSV_SPEED_LIMIT | LSV_ERROR_HANDLE | LSV_DRYRUN;
                lr->lr_speed = bk->lb_speed_limit;
                lr->lr_version = bk->lb_version;
                lr->lr_param |= bk->lb_param;
index ce8452f..2a64ea7 100644 (file)
@@ -98,6 +98,7 @@ const char *lfsck_param_names[] = {
        "broadcast",
        "orphan",
        "create_ostobj",
+       "create_mdtobj",
        NULL
 };
 
@@ -2540,7 +2541,8 @@ static int lfsck_start_all(const struct lu_env *env,
        lr->lr_param = start->ls_flags;
        lr->lr_async_windows = bk->lb_async_windows;
        lr->lr_valid = LSV_SPEED_LIMIT | LSV_ERROR_HANDLE | LSV_DRYRUN |
-                      LSV_ASYNC_WINDOWS;
+                      LSV_ASYNC_WINDOWS | LSV_CREATE_OSTOBJ |
+                      LSV_CREATE_MDTOBJ;
 
        laia->laia_com = NULL;
        laia->laia_ltds = ltds;
index ce8263b..0932f78 100644 (file)
@@ -49,6 +49,7 @@ static struct option long_opt_start[] = {
        {"device",              required_argument, 0, 'M'},
        {"all",                 no_argument,       0, 'A'},
        {"create_ostobj",       optional_argument, 0, 'c'},
+       {"create_mdtobj",       optional_argument, 0, 'C'},
        {"error",               required_argument, 0, 'e'},
        {"help",                no_argument,       0, 'h'},
        {"dryrun",              optional_argument, 0, 'n'},