diff options
Diffstat (limited to 'kernel/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h')
-rw-r--r-- | kernel/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/kernel/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/kernel/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index a66dc3c6d..ab6c4580f 100644 --- a/kernel/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/kernel/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -47,10 +47,14 @@ struct ldlm_res_id; struct ptlrpc_request_set; extern int test_req_buffer_pressure; extern struct mutex ptlrpc_all_services_mutex; +extern struct list_head ptlrpc_all_services; + +extern struct mutex ptlrpcd_mutex; +extern struct mutex pinger_mutex; int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait); /* ptlrpcd.c */ -int ptlrpcd_start(int index, int max, const char *name, struct ptlrpcd_ctl *pc); +int ptlrpcd_start(struct ptlrpcd_ctl *pc); /* client.c */ struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned npages, unsigned max_brw, @@ -76,19 +80,16 @@ void ptlrpc_initiate_recovery(struct obd_import *imp); int lustre_unpack_req_ptlrpc_body(struct ptlrpc_request *req, int offset); int lustre_unpack_rep_ptlrpc_body(struct ptlrpc_request *req, int offset); -#if defined(CONFIG_PROC_FS) -void ptlrpc_lprocfs_register_service(struct proc_dir_entry *proc_entry, - struct ptlrpc_service *svc); +int ptlrpc_sysfs_register_service(struct kset *parent, + struct ptlrpc_service *svc); +void ptlrpc_sysfs_unregister_service(struct ptlrpc_service *svc); + +void ptlrpc_ldebugfs_register_service(struct dentry *debugfs_entry, + struct ptlrpc_service *svc); void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc); void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req, long amount); void ptlrpc_lprocfs_do_request_stat(struct ptlrpc_request *req, long q_usec, long work_usec); -#else -#define ptlrpc_lprocfs_register_service(params...) do {} while (0) -#define ptlrpc_lprocfs_unregister_service(params...) do {} while (0) -#define ptlrpc_lprocfs_rpc_sent(params...) do {} while (0) -#define ptlrpc_lprocfs_do_request_stat(params...) do {} while (0) -#endif /* CONFIG_PROC_FS */ /* NRS */ @@ -113,6 +114,8 @@ struct nrs_core { }; +extern struct nrs_core nrs_core; + int ptlrpc_service_nrs_setup(struct ptlrpc_service *svc); void ptlrpc_service_nrs_cleanup(struct ptlrpc_service *svc); @@ -134,13 +137,6 @@ ptlrpc_nrs_req_get_nolock(struct ptlrpc_service_part *svcpt, bool hp, return ptlrpc_nrs_req_get_nolock0(svcpt, hp, false, force); } -static inline struct ptlrpc_request * -ptlrpc_nrs_req_peek_nolock(struct ptlrpc_service_part *svcpt, bool hp) -{ - return ptlrpc_nrs_req_get_nolock0(svcpt, hp, true, false); -} - -void ptlrpc_nrs_req_del_nolock(struct ptlrpc_request *req); bool ptlrpc_nrs_req_pending_nolock(struct ptlrpc_service_part *svcpt, bool hp); int ptlrpc_nrs_policy_control(const struct ptlrpc_service *svc, @@ -246,8 +242,6 @@ int ptlrpc_stop_pinger(void); void ptlrpc_pinger_sending_on_import(struct obd_import *imp); void ptlrpc_pinger_commit_expected(struct obd_import *imp); void ptlrpc_pinger_wake_up(void); -void ptlrpc_ping_import_soon(struct obd_import *imp); -int ping_evictor_wake(struct obd_export *exp); /* sec_null.c */ int sptlrpc_null_init(void); @@ -263,14 +257,8 @@ void sptlrpc_enc_pool_fini(void); int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v); /* sec_lproc.c */ -#if defined(CONFIG_PROC_FS) int sptlrpc_lproc_init(void); void sptlrpc_lproc_fini(void); -#else -static inline int sptlrpc_lproc_init(void) -{ return 0; } -static inline void sptlrpc_lproc_fini(void) {} -#endif /* sec_gc.c */ int sptlrpc_gc_init(void); @@ -307,6 +295,6 @@ static inline void tgt_mod_exit(void) static inline void ptlrpc_reqset_put(struct ptlrpc_request_set *set) { if (atomic_dec_and_test(&set->set_refcount)) - OBD_FREE_PTR(set); + kfree(set); } #endif /* PTLRPC_INTERNAL_H */ |