X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fptlrpc_module.c;h=a460271f2ecca1c5db4e143d5d2a0e277eb0a530;hb=fb4073bc3cfbf1a7ad17b03270e986098a2869ee;hp=5d7d35eb5f1c7b6f95da8031e72085e9912f3e91;hpb=ac391ce3aa27602c81890e8b7e74bff74eb36e50;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/ptlrpc_module.c b/lustre/ptlrpc/ptlrpc_module.c index 5d7d35e..a460271 100644 --- a/lustre/ptlrpc/ptlrpc_module.c +++ b/lustre/ptlrpc/ptlrpc_module.c @@ -50,11 +50,11 @@ #include "ptlrpc_internal.h" -extern spinlock_t ptlrpc_last_xid_lock; -extern spinlock_t ptlrpc_rs_debug_lock; -extern spinlock_t ptlrpc_all_services_lock; -extern struct semaphore pinger_sem; -extern struct semaphore ptlrpcd_sem; +extern cfs_spinlock_t ptlrpc_last_xid_lock; +extern cfs_spinlock_t ptlrpc_rs_debug_lock; +extern cfs_spinlock_t ptlrpc_all_services_lock; +extern cfs_semaphore_t pinger_sem; +extern cfs_semaphore_t ptlrpcd_sem; __init int ptlrpc_init(void) { @@ -62,20 +62,25 @@ __init int ptlrpc_init(void) ENTRY; lustre_assert_wire_constants(); - spin_lock_init(&ptlrpc_rs_debug_lock); - spin_lock_init(&ptlrpc_all_services_lock); - init_mutex(&pinger_sem); - init_mutex(&ptlrpcd_sem); + cfs_spin_lock_init(&ptlrpc_rs_debug_lock); + cfs_spin_lock_init(&ptlrpc_all_services_lock); + cfs_init_mutex(&pinger_sem); + cfs_init_mutex(&ptlrpcd_sem); ptlrpc_init_xid(); rc = req_layout_init(); if (rc) RETURN(rc); + + rc = ptlrpc_hr_init(); + if (rc) + RETURN(rc); + cleanup_phase = 1; rc = ptlrpc_init_portals(); if (rc) - RETURN(rc); + GOTO(cleanup, rc); cleanup_phase = 2; rc = ptlrpc_connection_init(); @@ -119,6 +124,7 @@ cleanup: case 2: ptlrpc_exit_portals(); case 1: + ptlrpc_hr_fini(); req_layout_fini(); default: ; } @@ -134,6 +140,7 @@ static void __exit ptlrpc_exit(void) ldlm_exit(); ptlrpc_stop_pinger(); ptlrpc_exit_portals(); + ptlrpc_hr_fini(); ptlrpc_connection_fini(); } @@ -167,6 +174,8 @@ EXPORT_SYMBOL(ptlrpc_add_rqs_to_pool); EXPORT_SYMBOL(ptlrpc_init_rq_pool); EXPORT_SYMBOL(ptlrpc_free_rq_pool); EXPORT_SYMBOL(ptlrpc_prep_req_pool); +EXPORT_SYMBOL(ptlrpc_prep_fakereq); +EXPORT_SYMBOL(ptlrpc_fakereq_finished); EXPORT_SYMBOL(ptlrpc_at_set_req_timeout); EXPORT_SYMBOL(ptlrpc_request_alloc); EXPORT_SYMBOL(ptlrpc_request_alloc_pool); @@ -183,6 +192,7 @@ EXPORT_SYMBOL(ptlrpc_prep_bulk_exp); EXPORT_SYMBOL(ptlrpc_free_bulk); EXPORT_SYMBOL(ptlrpc_prep_bulk_page); EXPORT_SYMBOL(ptlrpc_abort_inflight); +EXPORT_SYMBOL(ptlrpc_cleanup_imp); EXPORT_SYMBOL(ptlrpc_retain_replayable_request); EXPORT_SYMBOL(ptlrpc_next_xid); EXPORT_SYMBOL(ptlrpc_req_set_repsize); @@ -209,11 +219,10 @@ EXPORT_SYMBOL(ptlrpc_stop_all_threads); EXPORT_SYMBOL(ptlrpc_start_threads); EXPORT_SYMBOL(ptlrpc_start_thread); EXPORT_SYMBOL(ptlrpc_unregister_service); -EXPORT_SYMBOL(ptlrpc_daemonize); EXPORT_SYMBOL(ptlrpc_service_health_check); +EXPORT_SYMBOL(ptlrpc_hpreq_reorder); /* pack_generic.c */ -EXPORT_SYMBOL(lustre_msg_swabbed); EXPORT_SYMBOL(lustre_msg_check_version); EXPORT_SYMBOL(lustre_pack_request); EXPORT_SYMBOL(lustre_pack_reply); @@ -222,13 +231,13 @@ EXPORT_SYMBOL(lustre_shrink_msg); EXPORT_SYMBOL(lustre_free_reply_state); EXPORT_SYMBOL(lustre_msg_size); EXPORT_SYMBOL(lustre_packed_msg_size); -EXPORT_SYMBOL(lustre_unpack_msg); +EXPORT_SYMBOL(ptlrpc_unpack_rep_msg); +EXPORT_SYMBOL(ptlrpc_unpack_req_msg); EXPORT_SYMBOL(lustre_msg_buf); EXPORT_SYMBOL(lustre_msg_string); +EXPORT_SYMBOL(ptlrpc_buf_set_swabbed); +EXPORT_SYMBOL(ptlrpc_buf_need_swab); EXPORT_SYMBOL(lustre_swab_ptlrpc_body); -EXPORT_SYMBOL(lustre_swab_buf); -EXPORT_SYMBOL(lustre_swab_reqbuf); -EXPORT_SYMBOL(lustre_swab_repbuf); EXPORT_SYMBOL(lustre_swab_obdo); EXPORT_SYMBOL(lustre_swab_obd_statfs); EXPORT_SYMBOL(lustre_swab_obd_ioobj); @@ -239,23 +248,16 @@ EXPORT_SYMBOL(lustre_swab_ost_lvb); EXPORT_SYMBOL(lustre_swab_mds_status_req); EXPORT_SYMBOL(lustre_swab_mds_body); EXPORT_SYMBOL(lustre_swab_mdt_body); -EXPORT_SYMBOL(lustre_swab_mdt_epoch); +EXPORT_SYMBOL(lustre_swab_mdt_ioepoch); EXPORT_SYMBOL(lustre_swab_obd_quotactl); EXPORT_SYMBOL(lustre_swab_mds_remote_perm); EXPORT_SYMBOL(lustre_swab_mdt_remote_perm); -EXPORT_SYMBOL(lustre_swab_mds_rec_setattr); -EXPORT_SYMBOL(lustre_swab_mds_rec_create); -EXPORT_SYMBOL(lustre_swab_mds_rec_join); -EXPORT_SYMBOL(lustre_swab_mdt_rec_join); -EXPORT_SYMBOL(lustre_swab_mds_rec_link); -EXPORT_SYMBOL(lustre_swab_mds_rec_unlink); -EXPORT_SYMBOL(lustre_swab_mds_rec_rename); EXPORT_SYMBOL(lustre_swab_mdt_rec_reint); EXPORT_SYMBOL(lustre_swab_lov_desc); -EXPORT_SYMBOL(lustre_swab_lov_user_md); -EXPORT_SYMBOL(lustre_swab_lov_mds_md); +EXPORT_SYMBOL(lustre_swab_lov_user_md_v1); +EXPORT_SYMBOL(lustre_swab_lov_user_md_v3); EXPORT_SYMBOL(lustre_swab_lov_user_md_objects); -EXPORT_SYMBOL(lustre_swab_lov_user_md_join); +EXPORT_SYMBOL(lustre_swab_lov_mds_md); EXPORT_SYMBOL(lustre_swab_ldlm_res_id); EXPORT_SYMBOL(lustre_swab_ldlm_policy_data); EXPORT_SYMBOL(lustre_swab_ldlm_intent); @@ -263,8 +265,13 @@ EXPORT_SYMBOL(lustre_swab_ldlm_resource_desc); EXPORT_SYMBOL(lustre_swab_ldlm_lock_desc); EXPORT_SYMBOL(lustre_swab_ldlm_request); EXPORT_SYMBOL(lustre_swab_ldlm_reply); +EXPORT_SYMBOL(dump_ioo); +EXPORT_SYMBOL(dump_rniobuf); +EXPORT_SYMBOL(dump_obdo); +EXPORT_SYMBOL(dump_ost_body); +EXPORT_SYMBOL(dump_rcs); EXPORT_SYMBOL(lustre_swab_qdata); -EXPORT_SYMBOL(lustre_swab_qdata_old); +EXPORT_SYMBOL(lustre_swab_quota_adjust_qunit); EXPORT_SYMBOL(lustre_msg_get_flags); EXPORT_SYMBOL(lustre_msg_add_flags); EXPORT_SYMBOL(lustre_msg_set_flags); @@ -279,6 +286,7 @@ EXPORT_SYMBOL(lustre_msg_add_version); EXPORT_SYMBOL(lustre_msg_get_opc); EXPORT_SYMBOL(lustre_msg_get_last_xid); EXPORT_SYMBOL(lustre_msg_get_last_committed); +EXPORT_SYMBOL(lustre_msg_get_versions); EXPORT_SYMBOL(lustre_msg_get_transno); EXPORT_SYMBOL(lustre_msg_get_status); EXPORT_SYMBOL(lustre_msg_get_slv); @@ -293,11 +301,11 @@ EXPORT_SYMBOL(lustre_msg_set_type); EXPORT_SYMBOL(lustre_msg_set_opc); EXPORT_SYMBOL(lustre_msg_set_last_xid); EXPORT_SYMBOL(lustre_msg_set_last_committed); +EXPORT_SYMBOL(lustre_msg_set_versions); EXPORT_SYMBOL(lustre_msg_set_transno); EXPORT_SYMBOL(lustre_msg_set_status); EXPORT_SYMBOL(lustre_msg_set_conn_cnt); EXPORT_SYMBOL(lustre_swab_mgs_target_info); -EXPORT_SYMBOL(lustre_swab_md_fld); EXPORT_SYMBOL(lustre_swab_generic_32s); EXPORT_SYMBOL(lustre_swab_lustre_capa); EXPORT_SYMBOL(lustre_swab_lustre_capa_key); @@ -317,6 +325,8 @@ EXPORT_SYMBOL(ptlrpc_recover_import); /* pinger.c */ EXPORT_SYMBOL(ptlrpc_pinger_add_import); EXPORT_SYMBOL(ptlrpc_pinger_del_import); +EXPORT_SYMBOL(ptlrpc_add_timeout_client); +EXPORT_SYMBOL(ptlrpc_del_timeout_client); EXPORT_SYMBOL(ptlrpc_pinger_sending_on_import); /* ptlrpcd.c */