X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fptlrpc_internal.h;h=12a3c20155d5b93dbd3c0dc4088f1c963911630b;hb=316113bbe60da637297a914f336c5f1f81257c6a;hp=d7c23785d3a58ed971dfec636ed1965403a01a45;hpb=090c677210ee2946d99c71412e4ff762bb300f4f;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/ptlrpc_internal.h b/lustre/ptlrpc/ptlrpc_internal.h index d7c23785..12a3c20 100644 --- a/lustre/ptlrpc/ptlrpc_internal.h +++ b/lustre/ptlrpc/ptlrpc_internal.h @@ -32,8 +32,6 @@ struct obd_import; struct ldlm_res_id; struct ptlrpc_request_set; -void ptlrpc_daemonize(void); - void ptlrpc_request_handle_notconn(struct ptlrpc_request *); void lustre_assert_wire_constants(void); int ptlrpc_import_in_recovery(struct obd_import *imp); @@ -87,6 +85,14 @@ static inline int opcode_offset(__u32 opc) { (LDLM_LAST_OPC - LDLM_FIRST_OPC) + (MDS_LAST_OPC - MDS_FIRST_OPC) + (OST_LAST_OPC - OST_FIRST_OPC)); + } else if (opc < SEC_LAST_OPC) { + /* Security negotiate */ + return (opc - SEC_FIRST_OPC + + (PTLBD_LAST_OPC - PTLBD_FIRST_OPC) + + (LDLM_LAST_OPC - LDLM_FIRST_OPC) + + (MDS_LAST_OPC - MDS_FIRST_OPC) + + (OST_LAST_OPC - OST_FIRST_OPC) + + (OBD_LAST_OPC - OBD_FIRST_OPC)); } else { /* Unknown Opcode */ return -1; @@ -97,68 +103,23 @@ static inline int opcode_offset(__u32 opc) { (LDLM_LAST_OPC - LDLM_FIRST_OPC) + \ (MDS_LAST_OPC - MDS_FIRST_OPC) + \ (OST_LAST_OPC - OST_FIRST_OPC) + \ - (OBD_LAST_OPC - OBD_FIRST_OPC)) + (OBD_LAST_OPC - OBD_FIRST_OPC) + \ + (SEC_LAST_OPC - SEC_FIRST_OPC)) enum { PTLRPC_REQWAIT_CNTR = 0, PTLRPC_REQQDEPTH_CNTR, PTLRPC_REQACTIVE_CNTR, + PTLRPC_REQBUF_AVAIL_CNTR, PTLRPC_LAST_CNTR }; int ptlrpc_expire_one_request(struct ptlrpc_request *req); -/* XXX these should be run-time checks so we can have one build run against - * many nals */ -#if defined(__KERNEL__) -#define ptl_requires_iov() 1 -#else -#define ptl_requires_iov() 0 -#endif - -#if defined(__KERNEL__) -# if defined(CRAY_PORTALS) -# define PTLRPC_PTL_MD_IOV (PTL_MD_IOVEC | PTL_MD_PHYS) -# else -# define PTLRPC_PTL_MD_IOV PTL_MD_KIOV -# endif -#else -# define PTLRPC_PTL_MD_IOV PTL_MD_IOVEC -#endif - -#if !defined(__KERNEL__) && defined(CRAY_PORTALS) -#define ptl_md_max_iovs() 1 -#else -#define ptl_md_max_iovs() 0 /* unlimited */ -#endif - -/* XXX hopefully we can make the iov a consistent type across portals imps */ -#if defined(__KERNEL__) -#define ptl_iov_base(kiov) (NULL) /* this is meaningless */ -#else -#define ptl_iov_base(iov) ((iov)->iov_base) -#endif - -#ifdef __KERNEL__ -/* portals calls the callback when the event is added to the queue, so we don't - * care if we lose events */ -# define PTLRPC_NUM_EQ 1024 -# define PTLRPC_EQ_CALLBACK ptlrpc_master_callback -#else -/* liblustre: no callback, or only when app polls event queues, so allocate a - * nice big event queue to ensure we don't drop any */ -# define PTLRPC_NUM_EQ 10240 -# if CRAY_PORTALS -int cray_portals_callback(ptl_event_t *ev); -# define PTLRPC_EQ_CALLBACK cray_portals_callback -# else -# define PTLRPC_EQ_CALLBACK PTL_EQ_HANDLER_NONE -# endif -#endif - /* pers.c */ -void pers_bulk_add_page(struct ptlrpc_bulk_desc *desc, struct page *page, - int pageoffset, int len); +void ptlrpc_fill_bulk_md(ptl_md_t *md, struct ptlrpc_bulk_desc *desc); +void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, struct page *page, + int pageoffset, int len); /* pinger.c */ int ptlrpc_start_pinger(void);