#define MGMT_CLI_REPLY_PORTAL 27
#define GKS_REQUEST_PORTAL 28
#define GKC_REPLY_PORTAL 29
+#define MDS_CLOSE_PORTAL 30
+#define OST_DESTROY_PORTAL 31
#define SVC_KILLED 1
#define SVC_EVENT 2
struct ptlrpc_service *mds_service;
struct ptlrpc_service *mds_setattr_service;
struct ptlrpc_service *mds_readpage_service;
+ struct ptlrpc_service *mds_close_service;
struct super_block *mds_sb;
struct vfsmount *mds_vfsmnt;
struct dentry *mds_id_de;
spinlock_t ost_lock;
struct ptlrpc_service *ost_service;
struct ptlrpc_service *ost_create_service;
+ struct ptlrpc_service *ost_destroy_service;
struct obd_service_time ost_stimes[6];
};
MDS_CLOSE, 3, reqsize, NULL);
if (req == NULL)
GOTO(out, rc = -ENOMEM);
+ req->rq_request_portal = MDS_CLOSE_PORTAL;
//reqsize[0] = lustre_secdesc_size();
//lustre_pack_secdesc(req, reqsize[0]);
if (rc)
GOTO(err_thread3, rc);
+ mds->mds_close_service =
+ ptlrpc_init_svc(MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE,
+ MDS_CLOSE_PORTAL, MDC_REPLY_PORTAL,
+ MDS_SERVICE_WATCHDOG_TIMEOUT,
+ mds_handle, "mds_close",
+ obd->obd_proc_entry);
+ if (!mds->mds_close_service) {
+ CERROR("failed to start close service\n");
+ GOTO(err_thread3, rc = -ENOMEM);
+ }
+
+ rc = ptlrpc_start_n_threads(obd, mds->mds_close_service,
+ MDT_NUM_THREADS, "ll_mdt_clos");
+
+ if (rc)
+ GOTO(err_thread4, rc);
RETURN(0);
+err_thread4:
+ ptlrpc_unregister_service(mds->mds_close_service);
err_thread3:
ptlrpc_unregister_service(mds->mds_readpage_service);
err_thread2:
struct mds_obd *mds = &obd->u.mds;
ENTRY;
+ ptlrpc_stop_all_threads(mds->mds_close_service);
+ ptlrpc_unregister_service(mds->mds_close_service);
+
ptlrpc_stop_all_threads(mds->mds_readpage_service);
ptlrpc_unregister_service(mds->mds_readpage_service);
OST_DESTROY, 1, &size, NULL);
if (!request)
RETURN(-ENOMEM);
+ request->rq_request_portal = OST_DESTROY_PORTAL;
body = lustre_msg_buf(request->rq_reqmsg, 0, sizeof (*body));
if (rc)
GOTO(out_create, rc = -EINVAL);
+ ost->ost_destroy_service =
+ ptlrpc_init_svc(OST_NBUFS, OST_BUFSIZE, OST_MAXREQSIZE,
+ OST_DESTROY_PORTAL, OSC_REPLY_PORTAL, 30000,
+ ost_handle, "ost_destroy",
+ obd->obd_proc_entry);
+ if (ost->ost_destroy_service == NULL) {
+ CERROR("failed to start service\n");
+ GOTO(out_create, rc = -ENOMEM);
+ }
+
+ rc = ptlrpc_start_n_threads(obd, ost->ost_destroy_service,
+ OST_NUM_THREADS, "ll_dstr_ost");
+ if (rc)
+ GOTO(out_destroy, rc = -EINVAL);
+
RETURN(0);
+out_destroy:
+ ptlrpc_unregister_service(ost->ost_destroy_service);
out_create:
ptlrpc_unregister_service(ost->ost_create_service);
out_service:
ptlrpc_stop_all_threads(ost->ost_create_service);
ptlrpc_unregister_service(ost->ost_create_service);
+ ptlrpc_stop_all_threads(ost->ost_destroy_service);
+ ptlrpc_unregister_service(ost->ost_destroy_service);
+
#ifdef ENABLE_GSS
/* XXX */
lgss_svc_cache_purge_all();