Whamcloud - gitweb
LU-12570 mdt: request env for DT threads 79/36179/3
authorAlexey Zhuravlev <bzzz@whamcloud.com>
Fri, 13 Sep 2019 19:28:06 +0000 (22:28 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 27 Sep 2019 23:09:23 +0000 (23:09 +0000)
as part of lock enqueue MDT thread can call ldlm_reclaim_full() to
cancel old unused LDLM locks and that scans all presented namespace
including OFD-originated (with extent locks). thus MDT ends with
calls into OFD code which needs own env marked with LCT_DT_THREAD.

Test-Parameters: testlist=sanity,sanity,sanity,sanity envdefinitions=ONLY="134a",SHARED_KEY=true
Test-Parameters: testlist=sanity,sanity,sanity,sanity envdefinitions=ONLY="134a",SHARED_KEY=true
Test-Parameters: testlist=sanity,sanity,sanity,sanity envdefinitions=ONLY="134a",SHARED_KEY=true
Signed-off-by: Alexey Zhuravlev <bzzz@whamcloud.com>
Change-Id: I231b88159978bc3ce7a3fa0f27e57eb32137c343
Reviewed-on: https://review.whamcloud.com/36179
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_mds.c

index 43d8e72..d7408b1 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,