- /*
- * setattr service configuration.
- *
- * XXX To keep the compatibility with old client(< 2.2), we need to
- * preserve this portal for a certain time, it should be removed
- * eventually. LU-617.
- */
- memset(&conf, 0, sizeof(conf));
- conf = (typeof(conf)) {
- .psc_name = LUSTRE_MDT_NAME "_setattr",
- .psc_watchdog_factor = MDT_SERVICE_WATCHDOG_FACTOR,
- .psc_buf = {
- .bc_nbufs = MDS_NBUFS,
- .bc_buf_size = MDS_BUFSIZE,
- .bc_req_max_size = MDS_MAXREQSIZE,
- .bc_rep_max_size = MDS_LOV_MAXREPSIZE,
- .bc_req_portal = MDS_SETATTR_PORTAL,
- .bc_rep_portal = MDC_REPLY_PORTAL,
- },
- .psc_thr = {
- .tc_thr_name = LUSTRE_MDT_NAME "_attr",
- .tc_thr_factor = MDS_SETA_THR_FACTOR,
- .tc_nthrs_init = MDS_SETA_NTHRS_INIT,
- .tc_nthrs_base = MDS_SETA_NTHRS_BASE,
- .tc_nthrs_max = MDS_SETA_NTHRS_MAX,
- .tc_nthrs_user = mds_attr_num_threads,
- .tc_cpu_bind = mds_attr_cpu_bind,
- .tc_ctx_tags = LCT_MD_THREAD,
- },
- .psc_cpt = {
- .cc_pattern = mds_attr_num_cpts,
- .cc_affinity = true,
- },
- .psc_ops = {
- .so_req_handler = tgt_request_handle,
- .so_req_printer = target_print_req,
- .so_hpreq_handler = NULL,
- },
- };
- m->mds_setattr_service = ptlrpc_register_service(&conf, &obd->obd_kset,
- obd->obd_debugfs_entry);
- if (IS_ERR(m->mds_setattr_service)) {
- rc = PTR_ERR(m->mds_setattr_service);
- CERROR("failed to start setattr service: %d\n", rc);
- m->mds_setattr_service = NULL;
-
- GOTO(err_mds_svc, rc);
- }
-