Whamcloud - gitweb
LU-8887 ptlrpc: remove unused pc->pc_env
[fs/lustre-release.git] / lustre / ptlrpc / ptlrpcd.c
index d375056..76c9066 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -85,8 +81,8 @@ struct ptlrpcd {
  * is used to derive a setting for ptlrpcd_per_cpt_max.
  */
 static int max_ptlrpcds;
-CFS_MODULE_PARM(max_ptlrpcds, "i", int, 0644,
-               "Max ptlrpcd thread count to be started.");
+module_param(max_ptlrpcds, int, 0644);
+MODULE_PARM_DESC(max_ptlrpcds, "Max ptlrpcd thread count to be started.");
 
 /*
  * ptlrpcd_bind_policy is obsolete, but retained to ensure that
@@ -95,16 +91,17 @@ CFS_MODULE_PARM(max_ptlrpcds, "i", int, 0644,
  * is used to derive a setting for ptlrpcd_partner_group_size.
  */
 static int ptlrpcd_bind_policy;
-CFS_MODULE_PARM(ptlrpcd_bind_policy, "i", int, 0644,
-               "Ptlrpcd threads binding mode (obsolete).");
+module_param(ptlrpcd_bind_policy, int, 0644);
+MODULE_PARM_DESC(ptlrpcd_bind_policy,
+                "Ptlrpcd threads binding mode (obsolete).");
 
 /*
  * ptlrpcd_per_cpt_max: The maximum number of ptlrpcd threads to run
  * in a CPT.
  */
 static int ptlrpcd_per_cpt_max;
-CFS_MODULE_PARM(ptlrpcd_per_cpt_max, "i", int, 0644,
-               "Max ptlrpcd thread count to be started per cpt.");
+MODULE_PARM_DESC(ptlrpcd_per_cpt_max,
+                "Max ptlrpcd thread count to be started per cpt.");
 
 /*
  * ptlrpcd_partner_group_size: The desired number of threads in each
@@ -113,8 +110,9 @@ CFS_MODULE_PARM(ptlrpcd_per_cpt_max, "i", int, 0644,
  * a CPT partners of each other.
  */
 static int ptlrpcd_partner_group_size;
-CFS_MODULE_PARM(ptlrpcd_partner_group_size, "i", int, 0644,
-               "Number of ptlrpcd threads in a partner group.");
+module_param(ptlrpcd_partner_group_size, int, 0644);
+MODULE_PARM_DESC(ptlrpcd_partner_group_size,
+                "Number of ptlrpcd threads in a partner group.");
 
 /*
  * ptlrpcd_cpts: A CPT string describing the CPU partitions that
@@ -133,8 +131,9 @@ CFS_MODULE_PARM(ptlrpcd_partner_group_size, "i", int, 0644,
  *   run ptlrpcd threads on CPTS 0, 1, 2, 3, 5, and 7.
  */
 static char *ptlrpcd_cpts;
-CFS_MODULE_PARM(ptlrpcd_cpts, "s", charp, 0644,
-               "CPU partitions ptlrpcd threads should run in");
+module_param(ptlrpcd_cpts, charp, 0644);
+MODULE_PARM_DESC(ptlrpcd_cpts,
+                "CPU partitions ptlrpcd threads should run in");
 
 /* ptlrpcds_cpt_idx maps cpt numbers to an index in the ptlrpcds array. */
 static int             *ptlrpcds_cpt_idx;
@@ -607,15 +606,6 @@ int ptlrpcd_start(struct ptlrpcd_ctl *pc)
                RETURN(0);
        }
 
-       /*
-        * So far only "client" ptlrpcd uses an environment. In the future,
-        * ptlrpcd thread (or a thread-set) has to be given an argument,
-        * describing its "scope".
-        */
-       rc = lu_context_init(&pc->pc_env.le_ctx, LCT_CL_THREAD|LCT_REMEMBER);
-       if (rc != 0)
-               GOTO(out, rc);
-
        task = kthread_run(ptlrpcd, pc, pc->pc_name);
        if (IS_ERR(task))
                GOTO(out_set, rc = PTR_ERR(task));
@@ -636,8 +626,6 @@ out_set:
                spin_unlock(&pc->pc_lock);
                ptlrpc_set_destroy(set);
        }
-       lu_context_fini(&pc->pc_env.le_ctx);
-out:
        clear_bit(LIOD_START, &pc->pc_flags);
        RETURN(rc);
 }
@@ -671,7 +659,6 @@ void ptlrpcd_free(struct ptlrpcd_ctl *pc)
        }
 
        wait_for_completion(&pc->pc_finishing);
-       lu_context_fini(&pc->pc_env.le_ctx);
 
        spin_lock(&pc->pc_lock);
        pc->pc_set = NULL;