Whamcloud - gitweb
LU-5969 lustreapi: remove obsolete lctl dump_cfg code 57/15857/4
authorAndreas Dilger <andreas.dilger@intel.com>
Tue, 22 Sep 2015 15:24:15 +0000 (11:24 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 24 Sep 2015 17:59:07 +0000 (17:59 +0000)
With Lustre having utilites that can read lustre record
logs from user space we no longer need the ability to
dump the log of recorded commands to the kernel dump log.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8b3b71ff394a1f81e4b2396449e0f6879c2b5623
Reviewed-on: http://review.whamcloud.com/15857
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_ioctl.h
lustre/include/obd_class.h
lustre/mgs/mgs_handler.c
lustre/obdclass/obd_config.c
lustre/utils/lctl.c
lustre/utils/obd.c
lustre/utils/obdctl.h

index a7670f3..8ead377 100644 (file)
@@ -369,7 +369,7 @@ obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf, int max_len)
 /*     OBD_IOC_PARSE           _IOWR('f', 182, OBD_IOC_DATA_TYPE) */
 /*     OBD_IOC_DORECORD        _IOWR('f', 183, OBD_IOC_DATA_TYPE) */
 #define OBD_IOC_PROCESS_CFG    _IOWR('f', 184, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_DUMP_LOG       _IOWR('f', 185, OBD_IOC_DATA_TYPE)
+/*     OBD_IOC_DUMP_LOG        _IOWR('f', 185, OBD_IOC_DATA_TYPE) */
 /*     OBD_IOC_CLEAR_LOG       _IOWR('f', 186, OBD_IOC_DATA_TYPE) */
 #define OBD_IOC_PARAM          _IOW ('f', 187, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_POOL           _IOWR('f', 188, OBD_IOC_DATA_TYPE)
index 7a37ba2..8f01ef5 100644 (file)
@@ -171,7 +171,7 @@ struct config_llog_instance {
        char                    *cfg_obdname;
        void                    *cfg_instance;
        struct super_block      *cfg_sb;
-       struct obd_uuid          cfg_uuid;
+       struct obd_uuid          cfg_uuid;
        llog_cb_t                cfg_callback;
        int                      cfg_last_idx; /* for partial llog processing */
        int                      cfg_flags;
@@ -179,8 +179,6 @@ struct config_llog_instance {
 };
 int class_config_parse_llog(const struct lu_env *env, struct llog_ctxt *ctxt,
                            char *name, struct config_llog_instance *cfg);
-int class_config_dump_llog(const struct lu_env *env, struct llog_ctxt *ctxt,
-                          char *name, struct config_llog_instance *cfg);
 
 enum {
        CONFIG_T_CONFIG  = 0,
index 8c2c8ea..ff23c33 100644 (file)
@@ -935,17 +935,6 @@ out_free:
                rc = mgs_iocontrol_nodemap(&env, mgs, data);
                break;
 
-       case OBD_IOC_DUMP_LOG: {
-               struct llog_ctxt *ctxt;
-
-               ctxt = llog_get_context(mgs->mgs_obd, LLOG_CONFIG_ORIG_CTXT);
-               rc = class_config_dump_llog(&env, ctxt, data->ioc_inlbuf1,
-                                           NULL);
-                llog_ctxt_put(ctxt);
-
-               break;
-        }
-
        case OBD_IOC_CATLOGLIST:
                rc = mgs_list_logs(&env, mgs, data);
                break;
index 0b6ff29..222038c 100644 (file)
@@ -1900,33 +1900,6 @@ int class_config_dump_handler(const struct lu_env *env,
        RETURN(rc);
 }
 
-int class_config_dump_llog(const struct lu_env *env, struct llog_ctxt *ctxt,
-                          char *name, struct config_llog_instance *cfg)
-{
-       struct llog_handle      *llh;
-       int                      rc;
-
-       ENTRY;
-
-       LCONSOLE_INFO("Dumping config log %s\n", name);
-
-       rc = llog_open(env, ctxt, &llh, NULL, name, LLOG_OPEN_EXISTS);
-       if (rc)
-               RETURN(rc);
-
-       rc = llog_init_handle(env, llh, LLOG_F_IS_PLAIN, NULL);
-       if (rc)
-               GOTO(parse_out, rc);
-
-       rc = llog_process(env, llh, class_config_dump_handler, cfg, NULL);
-parse_out:
-       llog_close(env, llh);
-
-       LCONSOLE_INFO("End config log %s\n", name);
-       RETURN(rc);
-}
-EXPORT_SYMBOL(class_config_dump_llog);
-
 /** Call class_cleanup and class_detach.
  * "Manual" only in the sense that we're faking lcfg commands.
  */
index 88c5fe8..23f7f58 100644 (file)
@@ -310,9 +310,6 @@ command_t cmdlist[] = {
          "usage: setup <args...>"},
         {"cleanup", jt_obd_cleanup, 0, "cleanup previously setup device\n"
          "usage: cleanup [force | failover]"},
-        {"dump_cfg", jt_cfg_dump_log, 0,
-         "print log of recorded commands for this config to kernel debug log\n"
-         "usage: dump_cfg config-uuid-name"},
 
         /* Test only commands */
         {"==== testing (DANGEROUS) ====", jt_noop, 0, "testing (DANGEROUS)"},
index bb19f34..06414a4 100644 (file)
@@ -2409,35 +2409,6 @@ int jt_obd_mdc_lookup(int argc, char **argv)
         return rc;
 }
 
-int jt_cfg_dump_log(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        char rawbuf[MAX_IOC_BUFLEN], *buf = rawbuf;
-        int rc;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        memset(&data, 0, sizeof(data));
-        data.ioc_dev = cur_device;
-        data.ioc_inllen1 = strlen(argv[1]) + 1;
-        data.ioc_inlbuf1 = argv[1];
-
-        memset(buf, 0, sizeof(rawbuf));
-        rc = obd_ioctl_pack(&data, &buf, sizeof(rawbuf));
-        if (rc) {
-                fprintf(stderr, "error: %s: invalid ioctl\n",
-                        jt_cmdname(argv[0]));
-                return rc;
-        }
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_DUMP_LOG, buf);
-        if (rc < 0)
-                fprintf(stderr, "OBD_IOC_DUMP_LOG failed: %s\n",
-                        strerror(errno));
-
-        return rc;
-}
-
 int jt_llog_catlist(int argc, char **argv)
 {
         struct obd_ioctl_data data;
index 95c3c59..0e8103f 100644 (file)
@@ -82,7 +82,6 @@ int jt_obd_deactivate(int argc, char **argv);
 int jt_obd_recover(int argc, char **argv);
 int jt_obd_mdc_lookup(int argc, char **argv);
 int jt_get_version(int argc, char **argv);
-int jt_cfg_dump_log(int argc, char **argv);
 int jt_get_obj_version(int argc, char **argv);
 
 int jt_llog_catlist(int argc, char **argv);