Whamcloud - gitweb
LU-14031 ptlrpc: remove unused code at pinger
[fs/lustre-release.git] / lustre / ptlrpc / sec_config.c
index 5fc4dc4..b661ff8 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2016, Intel Corporation.
+ * Copyright (c) 2011, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -44,7 +44,7 @@
 #include <lustre_log.h>
 #include <lustre_disk.h>
 #include <lustre_dlm.h>
-#include <lustre_param.h>
+#include <uapi/linux/lustre/lustre_param.h>
 #include <lustre_sec.h>
 
 #include "ptlrpc_internal.h"
@@ -504,49 +504,6 @@ struct sptlrpc_conf {
 static struct mutex sptlrpc_conf_lock;
 static struct list_head sptlrpc_confs;
 
-/*
- * The goal of this function is to extract the file system name
- * from the obd name. This can come in two flavors. One is
- * fsname-MDTXXXX or fsname-XXXXXXX were X is a hexadecimal
- * number. In both cases we should be returned fsname. If it is
- * not a valid obd name it is assumed to be the file system
- * name itself.
- */
-static void obdname2fsname(const char *tgt, char *fsname, size_t buflen)
-{
-       const char *ptr;
-       size_t len;
-
-       ptr = strrchr(tgt, '-');
-       if (ptr) {
-               if ((!strncmp(ptr, "-MDT", 4) ||
-                    !strncmp(ptr, "-OST", 4)) &&
-                    (isxdigit(ptr[4]) && isxdigit(ptr[5]) &&
-                     isxdigit(ptr[6]) && isxdigit(ptr[7])))
-                       goto valid_obd_name;
-
-               /* The length of the obdname can vary on different platforms */
-               len = strlen(ptr);
-               while (--len) {
-                       if (!isxdigit(ptr[len])) {
-                               ptr = NULL;
-                               break;
-                       }
-               }
-       }
-
-valid_obd_name:
-        /* if we didn't find the pattern, treat the whole string as fsname */
-        if (ptr == NULL)
-                len = strlen(tgt);
-        else
-                len = ptr - tgt;
-
-        len = min(len, buflen - 1);
-        memcpy(fsname, tgt, len);
-        fsname[len] = '\0';
-}
-
 static void sptlrpc_conf_free_rsets(struct sptlrpc_conf *conf)
 {
        struct sptlrpc_conf_tgt *conf_tgt, *conf_tgt_next;
@@ -668,7 +625,9 @@ static int __sptlrpc_process_config(struct lustre_cfg *lcfg,
         char                    fsname[MTI_NAME_MAXLEN];
         struct sptlrpc_rule     rule;
         int                     rc;
-        ENTRY;
+
+       ENTRY;
+       print_lustre_cfg(lcfg);
 
         target = lustre_cfg_string(lcfg, 1);
         if (target == NULL) {