Whamcloud - gitweb
LU-12811 ptlrpc: pass buffer size to the swabbing functions
[fs/lustre-release.git] / lustre / mdt / mdt_mds.c
index 43d8e72..860cdf9 100644 (file)
@@ -212,7 +212,10 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
                        .tc_nthrs_max           = MDS_NTHRS_MAX,
                        .tc_nthrs_user          = mds_num_threads,
                        .tc_cpu_bind            = mds_cpu_bind,
-                       .tc_ctx_tags            = LCT_MD_THREAD,
+                       /* LCT_DT_THREAD is required as MDT threads may scan
+                        * all LDLM namespaces (including OFD-originated) to
+                        * cancel LDLM locks */
+                       .tc_ctx_tags            = LCT_MD_THREAD | LCT_DT_THREAD,
                },
                .psc_cpt                = {
                        .cc_pattern             = mds_num_cpts,
@@ -484,10 +487,10 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
        }
 
 
-       mask = cfs_cpt_nodemask(cfs_cpt_table, CFS_CPT_ANY);
+       mask = cfs_cpt_nodemask(cfs_cpt_tab, CFS_CPT_ANY);
        /* event CPT feature is disabled in libcfs level by set partition
         * number to 1, we still want to set node affinity for io service */
-       if (cfs_cpt_number(cfs_cpt_table) == 1 && nodes_weight(*mask) > 1) {
+       if (cfs_cpt_number(cfs_cpt_tab) == 1 && nodes_weight(*mask) > 1) {
                int cpt = 0;
                int i;
 
@@ -500,8 +503,8 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
 
                        rc = cfs_cpt_set_node(mdt_io_cptable, cpt++, i);
                        if (!rc) {
-                               CWARN("MDS Failed to set node %d for"
-                                     "IO CPT table\n", i);
+                               CWARN("MDS Failed to set node %d for IO CPT table\n",
+                                     i);
                                cfs_cpt_table_free(mdt_io_cptable);
                                mdt_io_cptable = NULL;
                                break;
@@ -674,7 +677,7 @@ static int mds_health_check(const struct lu_env *env, struct obd_device *obd)
        return rc != 0 ? 1 : 0;
 }
 
-static struct obd_ops mds_obd_device_ops = {
+static const struct obd_ops mds_obd_device_ops = {
        .o_owner           = THIS_MODULE,
        .o_health_check    = mds_health_check,
 };