From: Alexey Zhuravlev Date: Fri, 13 Sep 2019 19:28:06 +0000 (+0300) Subject: LU-12570 mdt: request env for DT threads X-Git-Tag: 2.12.90~104 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=1f94d5eb2be4e921e909d8f18523dcab91bb6531;p=fs%2Flustre-release.git LU-12570 mdt: request env for DT threads 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 Change-Id: I231b88159978bc3ce7a3fa0f27e57eb32137c343 Reviewed-on: https://review.whamcloud.com/36179 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_mds.c b/lustre/mdt/mdt_mds.c index 43d8e72..d7408b1 100644 --- a/lustre/mdt/mdt_mds.c +++ b/lustre/mdt/mdt_mds.c @@ -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,