Data Structures | |
| struct | ptlrpc_connection |
| struct | ptlrpc_client |
| union | ptlrpc_async_args |
| struct | ptlrpc_request_set |
| struct | ptlrpc_set_cbdata |
| struct | ptlrpc_cb_id |
| struct | ptlrpc_reply_state |
| struct | ptlrpc_request_pool |
| struct | ptlrpc_hpreq_ops |
| struct | ptlrpc_request |
| Represents remote procedure call. More... | |
| struct | ptlrpc_bulk_page |
| struct | ptlrpc_bulk_desc |
| struct | ptlrpc_thread |
| struct | ptlrpc_request_buffer_desc |
| struct | ptlrpc_service |
| struct | ptlrpcd_ctl |
| struct | ptlrpc_service_conf |
| struct | ptlrpc_svc_data |
Defines | |
| #define | PTLRPC_MD_OPTIONS 0 |
| #define | PTLRPC_MAX_BRW_BITS LNET_MTU_BITS |
| #define | PTLRPC_MAX_BRW_SIZE (1<<LNET_MTU_BITS) |
| #define | PTLRPC_MAX_BRW_PAGES (PTLRPC_MAX_BRW_SIZE >> CFS_PAGE_SHIFT) |
| #define | SVC_BUF_VMALLOC_THRESHOLD (2 * CFS_PAGE_SIZE) |
| #define | LDLM_THREADS_AUTO_MIN (2) |
| #define | LDLM_THREADS_AUTO_MAX |
| #define | LDLM_BL_THREADS LDLM_THREADS_AUTO_MIN |
| #define | LDLM_NBUFS (64 * cfs_num_online_cpus()) |
| #define | LDLM_BUFSIZE (8 * 1024) |
| #define | LDLM_MAXREQSIZE (5 * 1024) |
| #define | LDLM_MAXREPSIZE (1024) |
| #define | MDT_MIN_THREADS 2UL |
| #define | MDT_MAX_THREADS 512UL |
| #define | MDT_NUM_THREADS |
| #define | MDS_THREADS_MIN 2 |
| #define | MDS_THREADS_MAX 512 |
| #define | MDS_THREADS_MIN_READPAGE 2 |
| #define | MDS_NBUFS (64 * cfs_num_online_cpus()) |
| #define | MDS_BUFSIZE (8 * 1024) |
| #define | MDS_MAXREQSIZE (5 * 1024) |
| #define | MDS_MAXREPSIZE max(9 * 1024, 362 + LOV_MAX_STRIPE_COUNT * 56) |
| #define | FLD_MAXREQSIZE (160) |
| #define | FLD_MAXREPSIZE (152) |
| #define | SEQ_MAXREQSIZE (160) |
| #define | SEQ_MAXREPSIZE (152) |
| #define | MGS_THREADS_AUTO_MIN 2 |
| #define | MGS_THREADS_AUTO_MAX 32 |
| #define | MGS_NBUFS (64 * cfs_num_online_cpus()) |
| #define | MGS_BUFSIZE (8 * 1024) |
| #define | MGS_MAXREQSIZE (7 * 1024) |
| #define | MGS_MAXREPSIZE (9 * 1024) |
| #define | OSS_THREADS_MIN 3 |
| #define | OSS_THREADS_MAX 512 |
| #define | OST_NBUFS (64 * cfs_num_online_cpus()) |
| #define | OST_BUFSIZE (8 * 1024) |
| #define | OST_MAXREQSIZE (5 * 1024) |
| #define | OST_MAXREPSIZE (9 * 1024) |
| #define | ptlrpc_req_async_args(req) ((void *)&req->rq_async_args) |
| #define | PTL_RPC_FL_INTR (1 << 0) |
| #define | PTL_RPC_FL_TIMEOUT (1 << 7) |
| #define | REQ_MAX_ACK_LOCKS 8 |
| #define | RS_MAX_LOCKS 8 |
| #define | RS_DEBUG 1 |
| #define | FLAG(field, str) (field ? str : "") |
| #define | DEBUG_REQ_FLAGS(req) |
| #define | REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s" |
| #define | debug_req(cdls, level, req, file, func, line, fmt, a...) |
| #define | DEBUG_REQ(level, req, fmt, args...) |
| #define | BULK_GET_SOURCE 0 |
| #define | BULK_PUT_SINK 1 |
| #define | BULK_GET_SINK 2 |
| #define | BULK_PUT_SOURCE 3 |
| #define | PTLRPC_SVC_HP_RATIO 10 |
| #define | PTLRPC_REPLY_MAYBE_DIFFICULT 0x01 |
| #define | PTLRPC_REPLY_EARLY 0x02 |
| #define | ptlrpc_hr_init() (0) |
| #define | ptlrpc_hr_fini() do {} while(0) |
| #define | LPRFL_EARLY_REPLY 1 |
| #define | ping_evictor_start() do {} while (0) |
| #define | ping_evictor_stop() do {} while (0) |
Typedefs | |
| typedef int(*) | set_interpreter_func (struct ptlrpc_request_set *, void *, int) |
| typedef int(*) | ptlrpc_interpterer_t (const struct lu_env *env, struct ptlrpc_request *req, void *arg, int rc) |
| Type of request interpreter call-back. | |
| typedef int(*) | svc_handler_t (struct ptlrpc_request *req) |
| typedef void(*) | svcreq_printfn_t (void *, struct ptlrpc_request *) |
| typedef int(*) | svc_hpreq_handler_t (struct ptlrpc_request *) |
| typedef int(*) | timeout_cb_t (struct timeout_item *, void *) |
Enumerations | |
| enum | rq_phase { RQ_PHASE_NEW = 0xebc0de00, RQ_PHASE_RPC = 0xebc0de01, RQ_PHASE_BULK = 0xebc0de02, RQ_PHASE_INTERPRET = 0xebc0de03, RQ_PHASE_COMPLETE = 0xebc0de04, RQ_PHASE_UNREGISTERING = 0xebc0de05, RQ_PHASE_UNDEFINED = 0xebc0de06 } |
| enum | ptlrpcd_ctl_flags { LIOD_START = 1 << 0, LIOD_STOP = 1 << 1, LIOD_FORCE = 1 << 2, LIOD_RECOVERY = 1 << 3 } |
| enum | timeout_event { TIMEOUT_GRANT = 1 } |
| enum | ptlrpcd_scope { PSCOPE_BRW, PSCOPE_OTHER, PSCOPE_NR } |
| Ptlrpcd scope is a set of two threads: ptlrpcd-foo and ptlrpcd-foo-rcv, these threads are used to asynchronously send requests queued with ptlrpcd_add_req(req, PCSOPE_FOO), and to handle completion call-backs for such requests. More... | |
Functions | |
| void | _debug_req (struct ptlrpc_request *req, __u32 mask, struct libcfs_debug_msg_data *data, const char *fmt,...) __attribute__((format(printf |
| int | ptlrpc_uuid_to_peer (struct obd_uuid *uuid, lnet_process_id_t *peer, lnet_nid_t *self) |
| void | request_out_callback (lnet_event_t *ev) |
| void | reply_in_callback (lnet_event_t *ev) |
| void | client_bulk_callback (lnet_event_t *ev) |
| void | request_in_callback (lnet_event_t *ev) |
| void | reply_out_callback (lnet_event_t *ev) |
| void | server_bulk_callback (lnet_event_t *ev) |
| ptlrpc_connection * | ptlrpc_connection_get (lnet_process_id_t peer, lnet_nid_t self, struct obd_uuid *uuid) |
| int | ptlrpc_connection_put (struct ptlrpc_connection *c) |
| ptlrpc_connection * | ptlrpc_connection_addref (struct ptlrpc_connection *) |
| int | ptlrpc_connection_init (void) |
| void | ptlrpc_connection_fini (void) |
| lnet_pid_t | ptl_get_pid (void) |
| int | ptlrpc_start_bulk_transfer (struct ptlrpc_bulk_desc *desc) |
| void | ptlrpc_abort_bulk (struct ptlrpc_bulk_desc *desc) |
| int | ptlrpc_register_bulk (struct ptlrpc_request *req) |
| int | ptlrpc_unregister_bulk (struct ptlrpc_request *req, int async) |
| int | ptlrpc_send_reply (struct ptlrpc_request *req, int flags) |
| int | ptlrpc_reply (struct ptlrpc_request *req) |
| int | ptlrpc_send_error (struct ptlrpc_request *req, int difficult) |
| int | ptlrpc_error (struct ptlrpc_request *req) |
| void | ptlrpc_resend_req (struct ptlrpc_request *request) |
| int | ptlrpc_at_get_net_latency (struct ptlrpc_request *req) |
| int | ptl_send_rpc (struct ptlrpc_request *request, int noreply) |
| int | ptlrpc_register_rqbd (struct ptlrpc_request_buffer_desc *rqbd) |
| void | ptlrpc_init_client (int req_portal, int rep_portal, char *name, struct ptlrpc_client *) |
| void | ptlrpc_cleanup_client (struct obd_import *imp) |
| ptlrpc_connection * | ptlrpc_uuid_to_connection (struct obd_uuid *uuid) |
| int | ptlrpc_queue_wait (struct ptlrpc_request *req) |
| int | ptlrpc_replay_req (struct ptlrpc_request *req) |
| int | ptlrpc_unregister_reply (struct ptlrpc_request *req, int async) |
| void | ptlrpc_restart_req (struct ptlrpc_request *req) |
| void | ptlrpc_abort_inflight (struct obd_import *imp) |
| void | ptlrpc_cleanup_imp (struct obd_import *imp) |
| void | ptlrpc_abort_set (struct ptlrpc_request_set *set) |
| ptlrpc_request_set * | ptlrpc_prep_set (void) |
| int | ptlrpc_set_add_cb (struct ptlrpc_request_set *set, set_interpreter_func fn, void *data) |
| int | ptlrpc_set_next_timeout (struct ptlrpc_request_set *) |
| Get the smallest timeout in the set; this does NOT set a timeout. | |
| int | ptlrpc_check_set (const struct lu_env *env, struct ptlrpc_request_set *set) |
| int | ptlrpc_set_wait (struct ptlrpc_request_set *) |
| int | ptlrpc_expired_set (void *data) |
| void | ptlrpc_interrupted_set (void *data) |
| void | ptlrpc_mark_interrupted (struct ptlrpc_request *req) |
| void | ptlrpc_set_destroy (struct ptlrpc_request_set *) |
| void | ptlrpc_set_add_req (struct ptlrpc_request_set *, struct ptlrpc_request *) |
| int | ptlrpc_set_add_new_req (struct ptlrpcd_ctl *pc, struct ptlrpc_request *req) |
| Lock so many callers can add things, the context that owns the set is supposed to notice these and move them into the set proper. | |
| void | ptlrpc_free_rq_pool (struct ptlrpc_request_pool *pool) |
| void | ptlrpc_add_rqs_to_pool (struct ptlrpc_request_pool *pool, int num_rq) |
| ptlrpc_request_pool * | ptlrpc_init_rq_pool (int, int, void(*populate_pool)(struct ptlrpc_request_pool *, int)) |
| void | ptlrpc_at_set_req_timeout (struct ptlrpc_request *req) |
| ptlrpc_request * | ptlrpc_request_alloc (struct obd_import *imp, const struct req_format *format) |
| ptlrpc_request * | ptlrpc_request_alloc_pool (struct obd_import *imp, struct ptlrpc_request_pool *, const struct req_format *format) |
| void | ptlrpc_request_free (struct ptlrpc_request *request) |
| int | ptlrpc_request_pack (struct ptlrpc_request *request, __u32 version, int opcode) |
| ptlrpc_request * | ptlrpc_request_alloc_pack (struct obd_import *imp, const struct req_format *format, __u32 version, int opcode) |
| int | ptlrpc_request_bufs_pack (struct ptlrpc_request *request, __u32 version, int opcode, char **bufs, struct ptlrpc_cli_ctx *ctx) |
| ptlrpc_request * | ptlrpc_prep_fakereq (struct obd_import *imp, unsigned int timeout, ptlrpc_interpterer_t interpreter) |
| void | ptlrpc_fakereq_finished (struct ptlrpc_request *req) |
| ptlrpc_request * | ptlrpc_prep_req (struct obd_import *imp, __u32 version, int opcode, int count, __u32 *lengths, char **bufs) |
| ptlrpc_request * | ptlrpc_prep_req_pool (struct obd_import *imp, __u32 version, int opcode, int count, __u32 *lengths, char **bufs, struct ptlrpc_request_pool *pool) |
| void | ptlrpc_req_finished (struct ptlrpc_request *request) |
| void | ptlrpc_req_finished_with_imp_lock (struct ptlrpc_request *request) |
| ptlrpc_request * | ptlrpc_request_addref (struct ptlrpc_request *req) |
| ptlrpc_bulk_desc * | ptlrpc_prep_bulk_imp (struct ptlrpc_request *req, int npages, int type, int portal) |
| ptlrpc_bulk_desc * | ptlrpc_prep_bulk_exp (struct ptlrpc_request *req, int npages, int type, int portal) |
| void | ptlrpc_free_bulk (struct ptlrpc_bulk_desc *bulk) |
| void | ptlrpc_prep_bulk_page (struct ptlrpc_bulk_desc *desc, cfs_page_t *page, int pageoffset, int len) |
| void | ptlrpc_retain_replayable_request (struct ptlrpc_request *req, struct obd_import *imp) |
| __u64 | ptlrpc_next_xid (void) |
| __u64 | ptlrpc_sample_next_xid (void) |
| __u64 | ptlrpc_req_xid (struct ptlrpc_request *request) |
| void | ptlrpc_save_lock (struct ptlrpc_request *req, struct lustre_handle *lock, int mode, int no_ack) |
| void | ptlrpc_commit_replies (struct obd_export *exp) |
| void | ptlrpc_dispatch_difficult_reply (struct ptlrpc_reply_state *rs) |
| void | ptlrpc_schedule_difficult_reply (struct ptlrpc_reply_state *rs) |
| ptlrpc_service * | ptlrpc_init_svc_conf (struct ptlrpc_service_conf *c, svc_handler_t h, char *name, struct proc_dir_entry *proc_entry, svcreq_printfn_t prntfn, char *threadname) |
| ptlrpc_service * | ptlrpc_init_svc (int nbufs, int bufsize, int max_req_size, int max_reply_size, int req_portal, int rep_portal, int watchdog_factor, svc_handler_t, char *name, cfs_proc_dir_entry_t *proc_entry, svcreq_printfn_t, int min_threads, int max_threads, char *threadname, __u32 ctx_tags, svc_hpreq_handler_t) |
| void | ptlrpc_stop_all_threads (struct ptlrpc_service *svc) |
| int | ptlrpc_start_threads (struct obd_device *dev, struct ptlrpc_service *svc) |
| int | ptlrpc_start_thread (struct obd_device *dev, struct ptlrpc_service *svc) |
| int | ptlrpc_unregister_service (struct ptlrpc_service *service) |
| int | liblustre_check_services (void *arg) |
| void | ptlrpc_daemonize (char *name) |
| int | ptlrpc_service_health_check (struct ptlrpc_service *) |
| void | ptlrpc_hpreq_reorder (struct ptlrpc_request *req) |
| void | ptlrpc_server_active_request_inc (struct ptlrpc_request *req) |
| increment the number of active requests consuming service threads. | |
| void | ptlrpc_server_active_request_dec (struct ptlrpc_request *req) |
| decrement the number of active requests consuming service threads. | |
| void | ptlrpc_server_drop_request (struct ptlrpc_request *req) |
| drop a reference count of the request. | |
| int | ptlrpc_connect_import (struct obd_import *imp, char *new_uuid) |
| int | ptlrpc_init_import (struct obd_import *imp) |
| int | ptlrpc_disconnect_import (struct obd_import *imp, int noclose) |
| int | ptlrpc_import_recovery_state_machine (struct obd_import *imp) |
| int | ptlrpc_reconnect_import (struct obd_import *imp) |
| int | ptlrpc_buf_need_swab (struct ptlrpc_request *req, const int inout, int index) |
| ptlrpc mgs buffer swab interface | |
| void | ptlrpc_buf_set_swabbed (struct ptlrpc_request *req, const int inout, int index) |
| int | ptlrpc_unpack_rep_msg (struct ptlrpc_request *req, int len) |
| int | ptlrpc_unpack_req_msg (struct ptlrpc_request *req, int len) |
| int | lustre_msg_check_version (struct lustre_msg *msg, __u32 version) |
| void | lustre_init_msg_v2 (struct lustre_msg_v2 *msg, int count, __u32 *lens, char **bufs) |
| int | lustre_pack_request (struct ptlrpc_request *, __u32 magic, int count, __u32 *lens, char **bufs) |
| int | lustre_pack_reply (struct ptlrpc_request *, int count, __u32 *lens, char **bufs) |
| int | lustre_pack_reply_v2 (struct ptlrpc_request *req, int count, __u32 *lens, char **bufs, int flags) |
| int | lustre_pack_reply_flags (struct ptlrpc_request *, int count, __u32 *lens, char **bufs, int flags) |
| int | lustre_shrink_msg (struct lustre_msg *msg, int segment, unsigned int newlen, int move_data) |
| void | lustre_free_reply_state (struct ptlrpc_reply_state *rs) |
| int | __lustre_unpack_msg (struct lustre_msg *m, int len) |
| int | lustre_msg_hdr_size (__u32 magic, int count) |
| int | lustre_msg_size (__u32 magic, int count, __u32 *lengths) |
| int | lustre_msg_size_v2 (int count, __u32 *lengths) |
| int | lustre_packed_msg_size (struct lustre_msg *msg) |
| int | lustre_msg_early_size (void) |
| void * | lustre_msg_buf_v2 (struct lustre_msg_v2 *m, int n, int min_size) |
| void * | lustre_msg_buf (struct lustre_msg *m, int n, int minlen) |
| int | lustre_msg_buflen (struct lustre_msg *m, int n) |
| lustre_msg_buflen - return the length of buffer n in message m | |
| void | lustre_msg_set_buflen (struct lustre_msg *m, int n, int len) |
| int | lustre_msg_bufcount (struct lustre_msg *m) |
| char * | lustre_msg_string (struct lustre_msg *m, int n, int max_len) |
| __u32 | lustre_msghdr_get_flags (struct lustre_msg *msg) |
| void | lustre_msghdr_set_flags (struct lustre_msg *msg, __u32 flags) |
| __u32 | lustre_msg_get_flags (struct lustre_msg *msg) |
| void | lustre_msg_add_flags (struct lustre_msg *msg, int flags) |
| void | lustre_msg_set_flags (struct lustre_msg *msg, int flags) |
| void | lustre_msg_clear_flags (struct lustre_msg *msg, int flags) |
| __u32 | lustre_msg_get_op_flags (struct lustre_msg *msg) |
| void | lustre_msg_add_op_flags (struct lustre_msg *msg, int flags) |
| void | lustre_msg_set_op_flags (struct lustre_msg *msg, int flags) |
| lustre_handle * | lustre_msg_get_handle (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_type (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_version (struct lustre_msg *msg) |
| void | lustre_msg_add_version (struct lustre_msg *msg, int version) |
| __u32 | lustre_msg_get_opc (struct lustre_msg *msg) |
| __u64 | lustre_msg_get_last_xid (struct lustre_msg *msg) |
| __u64 | lustre_msg_get_last_committed (struct lustre_msg *msg) |
| __u64 * | lustre_msg_get_versions (struct lustre_msg *msg) |
| __u64 | lustre_msg_get_transno (struct lustre_msg *msg) |
| __u64 | lustre_msg_get_slv (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_limit (struct lustre_msg *msg) |
| void | lustre_msg_set_slv (struct lustre_msg *msg, __u64 slv) |
| void | lustre_msg_set_limit (struct lustre_msg *msg, __u64 limit) |
| int | lustre_msg_get_status (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_conn_cnt (struct lustre_msg *msg) |
| int | lustre_msg_is_v1 (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_magic (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_timeout (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_service_time (struct lustre_msg *msg) |
| __u32 | lustre_msg_get_cksum (struct lustre_msg *msg) |
| __u32 | lustre_msg_calc_cksum (struct lustre_msg *msg) |
| void | lustre_msg_set_handle (struct lustre_msg *msg, struct lustre_handle *handle) |
| void | lustre_msg_set_type (struct lustre_msg *msg, __u32 type) |
| void | lustre_msg_set_opc (struct lustre_msg *msg, __u32 opc) |
| void | lustre_msg_set_last_xid (struct lustre_msg *msg, __u64 last_xid) |
| void | lustre_msg_set_last_committed (struct lustre_msg *msg, __u64 last_committed) |
| void | lustre_msg_set_versions (struct lustre_msg *msg, __u64 *versions) |
| void | lustre_msg_set_transno (struct lustre_msg *msg, __u64 transno) |
| void | lustre_msg_set_status (struct lustre_msg *msg, __u32 status) |
| void | lustre_msg_set_conn_cnt (struct lustre_msg *msg, __u32 conn_cnt) |
| void | ptlrpc_req_set_repsize (struct ptlrpc_request *req, int count, __u32 *sizes) |
| void | ptlrpc_request_set_replen (struct ptlrpc_request *req) |
| void | lustre_msg_set_timeout (struct lustre_msg *msg, __u32 timeout) |
| void | lustre_msg_set_service_time (struct lustre_msg *msg, __u32 service_time) |
| void | lustre_msg_set_cksum (struct lustre_msg *msg, __u32 cksum) |
| int | client_obd_setup (struct obd_device *obddev, struct lustre_cfg *lcfg) |
| int | client_obd_cleanup (struct obd_device *obddev) |
| int | client_connect_import (const struct lu_env *env, struct obd_export **exp, struct obd_device *obd, struct obd_uuid *cluuid, struct obd_connect_data *, void *localdata) |
| int | client_disconnect_export (struct obd_export *exp) |
| int | client_import_add_conn (struct obd_import *imp, struct obd_uuid *uuid, int priority) |
| int | client_import_del_conn (struct obd_import *imp, struct obd_uuid *uuid) |
| int | import_set_conn_priority (struct obd_import *imp, struct obd_uuid *uuid) |
| void | client_destroy_import (struct obd_import *imp) |
| int | server_disconnect_export (struct obd_export *exp) |
| int | ptlrpc_pinger_add_import (struct obd_import *imp) |
| int | ptlrpc_pinger_del_import (struct obd_import *imp) |
| int | ptlrpc_add_timeout_client (int time, enum timeout_event event, timeout_cb_t cb, void *data, cfs_list_t *obd_list) |
| int | ptlrpc_del_timeout_client (cfs_list_t *obd_list, enum timeout_event event) |
| ptlrpc_request * | ptlrpc_prep_ping (struct obd_import *imp) |
| int | ptlrpc_obd_ping (struct obd_device *obd) |
| cfs_time_t | ptlrpc_suspend_wakeup_time (void) |
| int | ptlrpc_check_and_wait_suspend (struct ptlrpc_request *req) |
| int | ptlrpcd_start (const char *name, struct ptlrpcd_ctl *pc) |
| void | ptlrpcd_stop (struct ptlrpcd_ctl *pc, int force) |
| void | ptlrpcd_wake (struct ptlrpc_request *req) |
| int | ptlrpcd_add_req (struct ptlrpc_request *req, enum ptlrpcd_scope scope) |
| void | ptlrpcd_add_rqset (struct ptlrpc_request_set *set) |
| int | ptlrpcd_addref (void) |
| void | ptlrpcd_decref (void) |
| const char * | ll_opcode2str (__u32 opcode) |
| int | llog_origin_handle_create (struct ptlrpc_request *req) |
| int | llog_origin_handle_destroy (struct ptlrpc_request *req) |
| int | llog_origin_handle_prev_block (struct ptlrpc_request *req) |
| int | llog_origin_handle_next_block (struct ptlrpc_request *req) |
| int | llog_origin_handle_read_header (struct ptlrpc_request *req) |
| int | llog_origin_handle_close (struct ptlrpc_request *req) |
| int | llog_origin_handle_cancel (struct ptlrpc_request *req) |
| int | llog_catinfo (struct ptlrpc_request *req) |
Variables | |
| lnet_handle_eq_t | ptlrpc_eq_h |
| llog_operations | llog_client_ops |
| #define DEBUG_REQ | ( | level, | |||
| req, | |||||
| fmt, | |||||
| args... | ) |
Value:
do { \ if ((level) & (D_ERROR | D_WARNING)) { \ static cfs_debug_limit_state_t cdls; \ debug_req(&cdls, level, req, __FILE__, __func__, __LINE__, \ "@@@ "fmt" ", ## args); \ } else \ debug_req(NULL, level, req, __FILE__, __func__, __LINE__, \ "@@@ "fmt" ", ## args); \ } while (0)
| #define debug_req | ( | cdls, | |||
| level, | |||||
| req, | |||||
| file, | |||||
| func, | |||||
| line, | |||||
| fmt, | |||||
| a... | ) |
Value:
do { \ CFS_CHECK_STACK(); \ \ if (((level) & D_CANTMASK) != 0 || \ ((libcfs_debug & (level)) != 0 && \ (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0)) { \ static struct libcfs_debug_msg_data _req_dbg_data = \ DEBUG_MSG_DATA_INIT(cdls, DEBUG_SUBSYSTEM, file, func, line); \ _debug_req((req), (level), &_req_dbg_data, fmt, ##a); \ } \ } while(0)
| #define DEBUG_REQ_FLAGS | ( | req | ) |
Value:
ptlrpc_rqphase2str(req), \
FLAG(req->rq_intr, "I"), FLAG(req->rq_replied, "R"), \
FLAG(req->rq_err, "E"), \
FLAG(req->rq_timedout, "X") /* eXpired */, FLAG(req->rq_resend, "S"), \
FLAG(req->rq_restart, "T"), FLAG(req->rq_replay, "P"), \
FLAG(req->rq_no_resend, "N"), \
FLAG(req->rq_waiting, "W"), \
FLAG(req->rq_wait_ctx, "C"), FLAG(req->rq_hp, "H")
| #define LDLM_THREADS_AUTO_MAX |
Value:
min_t(unsigned, cfs_num_online_cpus() * \
cfs_num_online_cpus() * 32, 128)
| #define MDT_NUM_THREADS |
Value:
max(min_t(unsigned long, MDT_MAX_THREADS, \ cfs_num_physpages >> (25 - CFS_PAGE_SHIFT)), \ 2UL)
| enum ptlrpcd_ctl_flags |
| enum ptlrpcd_scope |
Ptlrpcd scope is a set of two threads: ptlrpcd-foo and ptlrpcd-foo-rcv, these threads are used to asynchronously send requests queued with ptlrpcd_add_req(req, PCSOPE_FOO), and to handle completion call-backs for such requests.
Multiple scopes are needed to avoid dead-locks.
| int lustre_msg_buflen | ( | struct lustre_msg * | m, | |
| int | n | |||
| ) |
lustre_msg_buflen - return the length of buffer n in message m
| m | lustre_msg (request or reply) to look at | |
| n | message index (base 0) |
| void ptlrpc_server_drop_request | ( | struct ptlrpc_request * | req | ) |
drop a reference count of the request.
if it reaches 0, we either put it into history list, or free it immediately.