glusterfs  8.2
About: GlusterFS is a network/cluster filesystem. The storage server (or each in a cluster) runs glusterfsd and the clients use mount command or glusterfs client to mount the exported filesystem. Release series 8.x (latest version).
  Fossies Dox: glusterfs-8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rpcsvc.h File Reference
#include <glusterfs/gf-event.h>
#include "rpc-transport.h"
#include <glusterfs/dict.h>
#include "xdr-rpc.h"
#include "rpcsvc-common.h"
#include <pthread.h>
#include <sys/uio.h>
#include <inttypes.h>
#include <rpc/rpc_msg.h>
#include <glusterfs/compat.h>
#include <glusterfs/client_t.h>
Include dependency graph for rpcsvc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rpcsvc_notify_wrapper
 
struct  rpcsvc_listener_t
 
struct  rpcsvc_config
 
struct  rpcsvc_request
 
struct  rpcsvc_actor_desc
 
struct  rpcsvc_request_queue
 
struct  rpcsvc_program
 
struct  rpcsvc_cbk_program
 
struct  rpcsvc_auth_ops
 
struct  rpcsvc_auth_flavour_desc
 
struct  rpcsvc_auth_list
 

Macros

#define RPCSVC_INFRA_PROGRAM   7712846 /* random number */
 
#define RPCSVC_DEFAULT_OUTSTANDING_RPC_LIMIT    64 /* Default for protocol/server */
 
#define RPCSVC_DEF_NFS_OUTSTANDING_RPC_LIMIT   16 /* Default for nfs/server */
 
#define RPCSVC_MAX_OUTSTANDING_RPC_LIMIT   65536
 
#define RPCSVC_MIN_OUTSTANDING_RPC_LIMIT   0 /* No limit i.e. Unlimited */
 
#define GF_RPCSVC   "rpc-service"
 
#define RPCSVC_THREAD_STACK_SIZE   ((size_t)(1024 * GF_UNIT_KB))
 
#define RPCSVC_FRAGHDR_SIZE   4 /* 4-byte RPC fragment header size */
 
#define RPCSVC_DEFAULT_LISTEN_PORT   GF_DEFAULT_BASE_PORT
 
#define RPCSVC_DEFAULT_MEMFACTOR   8
 
#define RPCSVC_EVENTPOOL_SIZE_MULT   1024
 
#define RPCSVC_POOLCOUNT_MULT   64
 
#define RPCSVC_CONN_READ   (128 * GF_UNIT_KB)
 
#define RPCSVC_PAGE_SIZE   (128 * GF_UNIT_KB)
 
#define RPC_ROOT_UID   0
 
#define RPC_ROOT_GID   0
 
#define RPC_NOBODY_UID   65534
 
#define RPC_NOBODY_GID   65534
 
#define RPCSVC_READ_FRAGHDR   1
 
#define RPCSVC_READ_FRAG   2
 
#define RPCSVC_VECTORED_FRAGSZ   4096
 
#define RPCSVC_VECTOR_READCRED   1003
 
#define RPCSVC_VECTOR_READVERFSZ   1004
 
#define RPCSVC_VECTOR_READVERF   1005
 
#define RPCSVC_VECTOR_IGNORE   1006
 
#define RPCSVC_VECTOR_READVEC   1007
 
#define RPCSVC_VECTOR_READPROCHDR   1008
 
#define rpcsvc_record_vectored_baremsg(rs)    (((rs)->state == RPCSVC_READ_FRAG) && (rs)->vecstate == 0)
 
#define rpcsvc_record_vectored_cred(rs)    ((rs)->vecstate == RPCSVC_VECTOR_READCRED)
 
#define rpcsvc_record_vectored_verfsz(rs)    ((rs)->vecstate == RPCSVC_VECTOR_READVERFSZ)
 
#define rpcsvc_record_vectored_verfread(rs)    ((rs)->vecstate == RPCSVC_VECTOR_READVERF)
 
#define rpcsvc_record_vectored_ignore(rs)    ((rs)->vecstate == RPCSVC_VECTOR_IGNORE)
 
#define rpcsvc_record_vectored_readvec(rs)    ((rs)->vecstate == RPCSVC_VECTOR_READVEC)
 
#define rpcsvc_record_vectored_readprochdr(rs)    ((rs)->vecstate == RPCSVC_VECTOR_READPROCHDR)
 
#define rpcsvc_record_vectored(rs)   ((rs)->fragsize > RPCSVC_VECTORED_FRAGSZ)
 
#define RPCSVC_BARERPC_MSGSZ   32
 
#define rpcsvc_record_readfraghdr(rs)   ((rs)->state == RPCSVC_READ_FRAGHDR)
 
#define rpcsvc_record_readfrag(rs)   ((rs)->state == RPCSVC_READ_FRAG)
 
#define RPCSVC_LOWVERS   2
 
#define RPCSVC_HIGHVERS   2
 
#define rpcsvc_auth_flavour(au)   ((au).flavour)
 
#define rpcsvc_request_program(req)   ((rpcsvc_program_t *)((req)->prog))
 
#define rpcsvc_request_procnum(req)   (((req)->procnum))
 
#define rpcsvc_request_program_private(req)    (((rpcsvc_program_t *)((req)->prog))->private)
 
#define rpcsvc_request_accepted(req)   ((req)->rpc_status == MSG_ACCEPTED)
 
#define rpcsvc_request_accepted_success(req)   ((req)->rpc_err == SUCCESS)
 
#define rpcsvc_request_prog_minauth(req)   (rpcsvc_request_program(req)->min_auth)
 
#define rpcsvc_request_cred_flavour(req)   (rpcsvc_auth_flavour(req->cred))
 
#define rpcsvc_request_verf_flavour(req)   (rpcsvc_auth_flavour(req->verf))
 
#define rpcsvc_request_service(req)   ((req)->svc)
 
#define rpcsvc_request_uid(req)   ((req)->uid)
 
#define rpcsvc_request_gid(req)   ((req)->gid)
 
#define rpcsvc_request_private(req)   ((req)->private)
 
#define rpcsvc_request_xid(req)   ((req)->xid)
 
#define rpcsvc_request_set_private(req, prv)   (req)->private = (void *)(prv)
 
#define rpcsvc_request_iobref_ref(req)   (iobref_ref((req)->iobref))
 
#define rpcsvc_request_record_ref(req)   (iobuf_ref((req)->recordiob))
 
#define rpcsvc_request_record_unref(req)   (iobuf_unref((req)->recordiob))
 
#define rpcsvc_request_record_iob(req)   ((req)->recordiob)
 
#define rpcsvc_request_set_vecstate(req, state)   ((req)->vecstate = state)
 
#define rpcsvc_request_vecstate(req)   ((req)->vecstate)
 
#define rpcsvc_request_transport(req)   ((req)->trans)
 
#define rpcsvc_request_transport_ref(req)   (rpc_transport_ref((req)->trans))
 
#define RPC_AUTH_ROOT_SQUASH(req)
 
#define RPC_AUTH_ALL_SQUASH(req)
 
#define RPCSVC_ACTOR_SUCCESS   0
 
#define RPCSVC_ACTOR_ERROR   (-1)
 
#define RPCSVC_ACTOR_IGNORE   (-2)
 
#define RPCSVC_NAME_MAX   32
 
#define RPCSVC_PEER_STRLEN   1024
 
#define RPCSVC_AUTH_ACCEPT   1
 
#define RPCSVC_AUTH_REJECT   2
 
#define RPCSVC_AUTH_DONTCARE   3
 
#define rpcsvc_request_seterr(req, err)   ((req)->rpc_err = (int)(err))
 
#define rpcsvc_request_set_autherr(req, err)   ((req)->auth_err = (int)(err))
 

Typedefs

typedef struct rpcsvc_program rpcsvc_program_t
 
typedef struct rpcsvc_notify_wrapper rpcsvc_notify_wrapper_t
 
typedef struct rpcsvc_request rpcsvc_request_t
 
typedef struct drc_client drc_client_t
 
typedef struct drc_cached_op drc_cached_op_t
 
typedef int(* rpcsvc_actor) (rpcsvc_request_t *req)
 
typedef int(* rpcsvc_vector_sizer) (int state, ssize_t *readsize, char *base_addr, char *curr_addr)
 
typedef void *(* rpcsvc_encode_reply) (void *msg)
 
typedef void(* rpcsvc_deallocate_reply) (void *msg)
 
typedef struct rpcsvc_actor_desc rpcsvc_actor_t
 
typedef struct rpcsvc_request_queue rpcsvc_request_queue_t
 
typedef struct rpcsvc_cbk_program rpcsvc_cbk_program_t
 
typedef int(* auth_init_trans) (rpc_transport_t *trans, void *priv)
 
typedef int(* auth_init_request) (rpcsvc_request_t *req, void *priv)
 
typedef int(* auth_request_authenticate) (rpcsvc_request_t *req, void *priv)
 
typedef struct rpcsvc_auth_ops rpcsvc_auth_ops_t
 
typedef struct rpcsvc_auth_flavour_desc rpcsvc_auth_t
 
typedef void *(* rpcsvc_auth_initer_t) (rpcsvc_t *svc, dict_t *options)
 

Enumerations

enum  rpcsvc_infra_procnum_t { RPCSVC_PROC_EVENT_THREAD_DEATH = 0 }
 

Functions

int rpcsvc_program_register (rpcsvc_t *svc, rpcsvc_program_t *program, bool add_to_head)
 
int rpcsvc_program_unregister (rpcsvc_t *svc, rpcsvc_program_t *program)
 
int32_t rpcsvc_create_listeners (rpcsvc_t *svc, dict_t *options, char *name)
 
void rpcsvc_listener_destroy (rpcsvc_listener_t *listener)
 
int rpcsvc_program_register_portmap (rpcsvc_program_t *newprog, uint32_t port)
 
int rpcsvc_program_unregister_portmap (rpcsvc_program_t *newprog)
 
int rpcsvc_register_portmap_enabled (rpcsvc_t *svc)
 
rpcsvc_trpcsvc_init (xlator_t *xl, glusterfs_ctx_t *ctx, dict_t *options, uint32_t poolcount)
 
int rpcsvc_reconfigure_options (rpcsvc_t *svc, dict_t *options)
 
int rpcsvc_register_notify (rpcsvc_t *svc, rpcsvc_notify_t notify, void *mydata)
 
int rpcsvc_unregister_notify (rpcsvc_t *svc, rpcsvc_notify_t notify, void *mydata)
 
int rpcsvc_transport_submit (rpc_transport_t *trans, struct iovec *rpchdr, int rpchdrcount, struct iovec *proghdr, int proghdrcount, struct iovec *progpayload, int progpayloadcount, struct iobref *iobref, void *priv)
 
int rpcsvc_submit_message (rpcsvc_request_t *req, struct iovec *proghdr, int hdrcount, struct iovec *payload, int payloadcount, struct iobref *iobref)
 
int rpcsvc_submit_generic (rpcsvc_request_t *req, struct iovec *proghdr, int hdrcount, struct iovec *payload, int payloadcount, struct iobref *iobref)
 
int rpcsvc_error_reply (rpcsvc_request_t *req)
 
int rpcsvc_transport_peername (rpc_transport_t *trans, char *hostname, int hostlen)
 
int rpcsvc_transport_peeraddr (rpc_transport_t *trans, char *addrstr, int addrlen, struct sockaddr_storage *returnsa, socklen_t sasize)
 
int rpcsvc_auth_check (rpcsvc_t *svc, char *volname, char *ipaddr)
 
int rpcsvc_transport_privport_check (rpcsvc_t *svc, char *volname, uint16_t port)
 
int rpcsvc_submit_vectors (rpcsvc_request_t *req)
 
int rpcsvc_request_attach_vector (rpcsvc_request_t *req, struct iovec msgvec, struct iobuf *iob, struct iobref *ioref, int finalvector)
 
int rpcsvc_auth_request_init (rpcsvc_request_t *req, struct rpc_msg *callmsg)
 
int rpcsvc_auth_init (rpcsvc_t *svc, dict_t *options)
 
int rpcsvc_auth_reconf (rpcsvc_t *svc, dict_t *options)
 
int rpcsvc_auth_transport_init (rpc_transport_t *xprt)
 
int rpcsvc_authenticate (rpcsvc_request_t *req)
 
int rpcsvc_auth_array (rpcsvc_t *svc, char *volname, int *autharr, int arrlen)
 
gid_t * rpcsvc_auth_unix_auxgids (rpcsvc_request_t *req, int *arrlen)
 
char * rpcsvc_volume_allowed (dict_t *options, char *volname)
 
int rpcsvc_request_submit (rpcsvc_t *rpc, rpc_transport_t *trans, rpcsvc_cbk_program_t *prog, int procnum, void *req, glusterfs_ctx_t *ctx, xdrproc_t xdrproc)
 
int rpcsvc_callback_submit (rpcsvc_t *rpc, rpc_transport_t *trans, rpcsvc_cbk_program_t *prog, int procnum, struct iovec *proghdr, int proghdrcount, struct iobref *iobref)
 
rpcsvc_actor_trpcsvc_program_actor (rpcsvc_request_t *req)
 
int rpcsvc_transport_unix_options_build (dict_t *options, char *filepath)
 
int rpcsvc_set_allow_insecure (rpcsvc_t *svc, dict_t *options)
 
int rpcsvc_set_addr_namelookup (rpcsvc_t *svc, dict_t *options)
 
int rpcsvc_set_root_squash (rpcsvc_t *svc, dict_t *options)
 
int rpcsvc_set_all_squash (rpcsvc_t *svc, dict_t *options)
 
int rpcsvc_set_outstanding_rpc_limit (rpcsvc_t *svc, dict_t *options, int defvalue)
 
int rpcsvc_set_throttle_on (rpcsvc_t *svc)
 
int rpcsvc_set_throttle_off (rpcsvc_t *svc)
 
bool rpcsvc_get_throttle (rpcsvc_t *svc)
 
rpcsvc_vector_sizer rpcsvc_get_program_vector_sizer (rpcsvc_t *svc, uint32_t prognum, uint32_t progver, int procnum)
 
void rpcsvc_autoscale_threads (glusterfs_ctx_t *ctx, rpcsvc_t *rpc, int incr)
 
int rpcsvc_destroy (rpcsvc_t *svc)
 

Macro Definition Documentation

◆ GF_RPCSVC

#define GF_RPCSVC   "rpc-service"

Definition at line 47 of file rpcsvc.h.

◆ RPC_AUTH_ALL_SQUASH

#define RPC_AUTH_ALL_SQUASH (   req)
Value:
do { \
int gidcount = 0; \
if (req->svc->all_squash) { \
req->uid = req->svc->anonuid; \
req->gid = req->svc->anongid; \
\
for (gidcount = 0; gidcount < req->auxgidcount; ++gidcount) { \
if (!req->auxgids[gidcount]) \
req->auxgids[gidcount] = req->svc->anongid; \
} \
} \
} while (0);

Definition at line 308 of file rpcsvc.h.

◆ RPC_AUTH_ROOT_SQUASH

#define RPC_AUTH_ROOT_SQUASH (   req)
Value:
do { \
int gidcount = 0; \
if (req->svc->root_squash) { \
if (req->uid == RPC_ROOT_UID) \
req->uid = req->svc->anonuid; \
if (req->gid == RPC_ROOT_GID) \
req->gid = req->svc->anongid; \
\
for (gidcount = 0; gidcount < req->auxgidcount; ++gidcount) { \
if (!req->auxgids[gidcount]) \
req->auxgids[gidcount] = req->svc->anongid; \
} \
} \
} while (0);

Definition at line 292 of file rpcsvc.h.

◆ RPC_NOBODY_GID

#define RPC_NOBODY_GID   65534

Definition at line 60 of file rpcsvc.h.

◆ RPC_NOBODY_UID

#define RPC_NOBODY_UID   65534

Definition at line 59 of file rpcsvc.h.

◆ RPC_ROOT_GID

#define RPC_ROOT_GID   0

Definition at line 58 of file rpcsvc.h.

◆ RPC_ROOT_UID

#define RPC_ROOT_UID   0

Definition at line 57 of file rpcsvc.h.

◆ RPCSVC_ACTOR_ERROR

#define RPCSVC_ACTOR_ERROR   (-1)

Definition at line 323 of file rpcsvc.h.

◆ RPCSVC_ACTOR_IGNORE

#define RPCSVC_ACTOR_IGNORE   (-2)

Definition at line 324 of file rpcsvc.h.

◆ RPCSVC_ACTOR_SUCCESS

#define RPCSVC_ACTOR_SUCCESS   0

Definition at line 322 of file rpcsvc.h.

◆ RPCSVC_AUTH_ACCEPT

#define RPCSVC_AUTH_ACCEPT   1

Definition at line 548 of file rpcsvc.h.

◆ RPCSVC_AUTH_DONTCARE

#define RPCSVC_AUTH_DONTCARE   3

Definition at line 550 of file rpcsvc.h.

◆ rpcsvc_auth_flavour

#define rpcsvc_auth_flavour (   au)    ((au).flavour)

Definition at line 146 of file rpcsvc.h.

◆ RPCSVC_AUTH_REJECT

#define RPCSVC_AUTH_REJECT   2

Definition at line 549 of file rpcsvc.h.

◆ RPCSVC_BARERPC_MSGSZ

#define RPCSVC_BARERPC_MSGSZ   32

Definition at line 101 of file rpcsvc.h.

◆ RPCSVC_CONN_READ

#define RPCSVC_CONN_READ   (128 * GF_UNIT_KB)

Definition at line 55 of file rpcsvc.h.

◆ RPCSVC_DEF_NFS_OUTSTANDING_RPC_LIMIT

#define RPCSVC_DEF_NFS_OUTSTANDING_RPC_LIMIT   16 /* Default for nfs/server */

Definition at line 43 of file rpcsvc.h.

◆ RPCSVC_DEFAULT_LISTEN_PORT

#define RPCSVC_DEFAULT_LISTEN_PORT   GF_DEFAULT_BASE_PORT

Definition at line 51 of file rpcsvc.h.

◆ RPCSVC_DEFAULT_MEMFACTOR

#define RPCSVC_DEFAULT_MEMFACTOR   8

Definition at line 52 of file rpcsvc.h.

◆ RPCSVC_DEFAULT_OUTSTANDING_RPC_LIMIT

#define RPCSVC_DEFAULT_OUTSTANDING_RPC_LIMIT    64 /* Default for protocol/server */

Definition at line 41 of file rpcsvc.h.

◆ RPCSVC_EVENTPOOL_SIZE_MULT

#define RPCSVC_EVENTPOOL_SIZE_MULT   1024

Definition at line 53 of file rpcsvc.h.

◆ RPCSVC_FRAGHDR_SIZE

#define RPCSVC_FRAGHDR_SIZE   4 /* 4-byte RPC fragment header size */

Definition at line 50 of file rpcsvc.h.

◆ RPCSVC_HIGHVERS

#define RPCSVC_HIGHVERS   2

Definition at line 106 of file rpcsvc.h.

◆ RPCSVC_INFRA_PROGRAM

#define RPCSVC_INFRA_PROGRAM   7712846 /* random number */

Definition at line 35 of file rpcsvc.h.

◆ RPCSVC_LOWVERS

#define RPCSVC_LOWVERS   2

Definition at line 105 of file rpcsvc.h.

◆ RPCSVC_MAX_OUTSTANDING_RPC_LIMIT

#define RPCSVC_MAX_OUTSTANDING_RPC_LIMIT   65536

Definition at line 44 of file rpcsvc.h.

◆ RPCSVC_MIN_OUTSTANDING_RPC_LIMIT

#define RPCSVC_MIN_OUTSTANDING_RPC_LIMIT   0 /* No limit i.e. Unlimited */

Definition at line 45 of file rpcsvc.h.

◆ RPCSVC_NAME_MAX

#define RPCSVC_NAME_MAX   32

Definition at line 354 of file rpcsvc.h.

◆ RPCSVC_PAGE_SIZE

#define RPCSVC_PAGE_SIZE   (128 * GF_UNIT_KB)

Definition at line 56 of file rpcsvc.h.

◆ RPCSVC_PEER_STRLEN

#define RPCSVC_PEER_STRLEN   1024

Definition at line 547 of file rpcsvc.h.

◆ RPCSVC_POOLCOUNT_MULT

#define RPCSVC_POOLCOUNT_MULT   64

Definition at line 54 of file rpcsvc.h.

◆ RPCSVC_READ_FRAG

#define RPCSVC_READ_FRAG   2

Definition at line 64 of file rpcsvc.h.

◆ RPCSVC_READ_FRAGHDR

#define RPCSVC_READ_FRAGHDR   1

Definition at line 63 of file rpcsvc.h.

◆ rpcsvc_record_readfrag

#define rpcsvc_record_readfrag (   rs)    ((rs)->state == RPCSVC_READ_FRAG)

Definition at line 103 of file rpcsvc.h.

◆ rpcsvc_record_readfraghdr

#define rpcsvc_record_readfraghdr (   rs)    ((rs)->state == RPCSVC_READ_FRAGHDR)

Definition at line 102 of file rpcsvc.h.

◆ rpcsvc_record_vectored

#define rpcsvc_record_vectored (   rs)    ((rs)->fragsize > RPCSVC_VECTORED_FRAGSZ)

Definition at line 94 of file rpcsvc.h.

◆ rpcsvc_record_vectored_baremsg

#define rpcsvc_record_vectored_baremsg (   rs)     (((rs)->state == RPCSVC_READ_FRAG) && (rs)->vecstate == 0)

Definition at line 80 of file rpcsvc.h.

◆ rpcsvc_record_vectored_cred

#define rpcsvc_record_vectored_cred (   rs)     ((rs)->vecstate == RPCSVC_VECTOR_READCRED)

Definition at line 82 of file rpcsvc.h.

◆ rpcsvc_record_vectored_ignore

#define rpcsvc_record_vectored_ignore (   rs)     ((rs)->vecstate == RPCSVC_VECTOR_IGNORE)

Definition at line 88 of file rpcsvc.h.

◆ rpcsvc_record_vectored_readprochdr

#define rpcsvc_record_vectored_readprochdr (   rs)     ((rs)->vecstate == RPCSVC_VECTOR_READPROCHDR)

Definition at line 92 of file rpcsvc.h.

◆ rpcsvc_record_vectored_readvec

#define rpcsvc_record_vectored_readvec (   rs)     ((rs)->vecstate == RPCSVC_VECTOR_READVEC)

Definition at line 90 of file rpcsvc.h.

◆ rpcsvc_record_vectored_verfread

#define rpcsvc_record_vectored_verfread (   rs)     ((rs)->vecstate == RPCSVC_VECTOR_READVERF)

Definition at line 86 of file rpcsvc.h.

◆ rpcsvc_record_vectored_verfsz

#define rpcsvc_record_vectored_verfsz (   rs)     ((rs)->vecstate == RPCSVC_VECTOR_READVERFSZ)

Definition at line 84 of file rpcsvc.h.

◆ rpcsvc_request_accepted

#define rpcsvc_request_accepted (   req)    ((req)->rpc_status == MSG_ACCEPTED)

Definition at line 273 of file rpcsvc.h.

◆ rpcsvc_request_accepted_success

#define rpcsvc_request_accepted_success (   req)    ((req)->rpc_err == SUCCESS)

Definition at line 274 of file rpcsvc.h.

◆ rpcsvc_request_cred_flavour

#define rpcsvc_request_cred_flavour (   req)    (rpcsvc_auth_flavour(req->cred))

Definition at line 276 of file rpcsvc.h.

◆ rpcsvc_request_gid

#define rpcsvc_request_gid (   req)    ((req)->gid)

Definition at line 280 of file rpcsvc.h.

◆ rpcsvc_request_iobref_ref

#define rpcsvc_request_iobref_ref (   req)    (iobref_ref((req)->iobref))

Definition at line 284 of file rpcsvc.h.

◆ rpcsvc_request_private

#define rpcsvc_request_private (   req)    ((req)->private)

Definition at line 281 of file rpcsvc.h.

◆ rpcsvc_request_procnum

#define rpcsvc_request_procnum (   req)    (((req)->procnum))

Definition at line 270 of file rpcsvc.h.

◆ rpcsvc_request_prog_minauth

#define rpcsvc_request_prog_minauth (   req)    (rpcsvc_request_program(req)->min_auth)

Definition at line 275 of file rpcsvc.h.

◆ rpcsvc_request_program

#define rpcsvc_request_program (   req)    ((rpcsvc_program_t *)((req)->prog))

Definition at line 269 of file rpcsvc.h.

◆ rpcsvc_request_program_private

#define rpcsvc_request_program_private (   req)     (((rpcsvc_program_t *)((req)->prog))->private)

Definition at line 271 of file rpcsvc.h.

◆ rpcsvc_request_record_iob

#define rpcsvc_request_record_iob (   req)    ((req)->recordiob)

Definition at line 287 of file rpcsvc.h.

◆ rpcsvc_request_record_ref

#define rpcsvc_request_record_ref (   req)    (iobuf_ref((req)->recordiob))

Definition at line 285 of file rpcsvc.h.

◆ rpcsvc_request_record_unref

#define rpcsvc_request_record_unref (   req)    (iobuf_unref((req)->recordiob))

Definition at line 286 of file rpcsvc.h.

◆ rpcsvc_request_service

#define rpcsvc_request_service (   req)    ((req)->svc)

Definition at line 278 of file rpcsvc.h.

◆ rpcsvc_request_set_autherr

#define rpcsvc_request_set_autherr (   req,
  err 
)    ((req)->auth_err = (int)(err))

Definition at line 566 of file rpcsvc.h.

◆ rpcsvc_request_set_private

#define rpcsvc_request_set_private (   req,
  prv 
)    (req)->private = (void *)(prv)

Definition at line 283 of file rpcsvc.h.

◆ rpcsvc_request_set_vecstate

#define rpcsvc_request_set_vecstate (   req,
  state 
)    ((req)->vecstate = state)

Definition at line 288 of file rpcsvc.h.

◆ rpcsvc_request_seterr

#define rpcsvc_request_seterr (   req,
  err 
)    ((req)->rpc_err = (int)(err))

Definition at line 565 of file rpcsvc.h.

◆ rpcsvc_request_transport

#define rpcsvc_request_transport (   req)    ((req)->trans)

Definition at line 290 of file rpcsvc.h.

◆ rpcsvc_request_transport_ref

#define rpcsvc_request_transport_ref (   req)    (rpc_transport_ref((req)->trans))

Definition at line 291 of file rpcsvc.h.

◆ rpcsvc_request_uid

#define rpcsvc_request_uid (   req)    ((req)->uid)

Definition at line 279 of file rpcsvc.h.

◆ rpcsvc_request_vecstate

#define rpcsvc_request_vecstate (   req)    ((req)->vecstate)

Definition at line 289 of file rpcsvc.h.

◆ rpcsvc_request_verf_flavour

#define rpcsvc_request_verf_flavour (   req)    (rpcsvc_auth_flavour(req->verf))

Definition at line 277 of file rpcsvc.h.

◆ rpcsvc_request_xid

#define rpcsvc_request_xid (   req)    ((req)->xid)

Definition at line 282 of file rpcsvc.h.

◆ RPCSVC_THREAD_STACK_SIZE

#define RPCSVC_THREAD_STACK_SIZE   ((size_t)(1024 * GF_UNIT_KB))

Definition at line 48 of file rpcsvc.h.

◆ RPCSVC_VECTOR_IGNORE

#define RPCSVC_VECTOR_IGNORE   1006

Definition at line 76 of file rpcsvc.h.

◆ RPCSVC_VECTOR_READCRED

#define RPCSVC_VECTOR_READCRED   1003

Definition at line 73 of file rpcsvc.h.

◆ RPCSVC_VECTOR_READPROCHDR

#define RPCSVC_VECTOR_READPROCHDR   1008

Definition at line 78 of file rpcsvc.h.

◆ RPCSVC_VECTOR_READVEC

#define RPCSVC_VECTOR_READVEC   1007

Definition at line 77 of file rpcsvc.h.

◆ RPCSVC_VECTOR_READVERF

#define RPCSVC_VECTOR_READVERF   1005

Definition at line 75 of file rpcsvc.h.

◆ RPCSVC_VECTOR_READVERFSZ

#define RPCSVC_VECTOR_READVERFSZ   1004

Definition at line 74 of file rpcsvc.h.

◆ RPCSVC_VECTORED_FRAGSZ

#define RPCSVC_VECTORED_FRAGSZ   4096

Definition at line 72 of file rpcsvc.h.

Typedef Documentation

◆ auth_init_request

typedef int(* auth_init_request) (rpcsvc_request_t *req, void *priv)

Definition at line 577 of file rpcsvc.h.

◆ auth_init_trans

typedef int(* auth_init_trans) (rpc_transport_t *trans, void *priv)

Definition at line 576 of file rpcsvc.h.

◆ auth_request_authenticate

typedef int(* auth_request_authenticate) (rpcsvc_request_t *req, void *priv)

Definition at line 578 of file rpcsvc.h.

◆ drc_cached_op_t

Definition at line 1 of file rpcsvc.h.

◆ drc_client_t

typedef struct drc_client drc_client_t

Definition at line 1 of file rpcsvc.h.

◆ rpcsvc_actor

typedef int(* rpcsvc_actor) (rpcsvc_request_t *req)

Definition at line 338 of file rpcsvc.h.

◆ rpcsvc_actor_t

◆ rpcsvc_auth_initer_t

typedef void*(* rpcsvc_auth_initer_t) (rpcsvc_t *svc, dict_t *options)

Definition at line 597 of file rpcsvc.h.

◆ rpcsvc_auth_ops_t

◆ rpcsvc_auth_t

◆ rpcsvc_cbk_program_t

◆ rpcsvc_deallocate_reply

typedef void(* rpcsvc_deallocate_reply) (void *msg)

Definition at line 352 of file rpcsvc.h.

◆ rpcsvc_encode_reply

typedef void*(* rpcsvc_encode_reply) (void *msg)

Definition at line 346 of file rpcsvc.h.

◆ rpcsvc_notify_wrapper_t

Definition at line 1 of file rpcsvc.h.

◆ rpcsvc_program_t

Definition at line 1 of file rpcsvc.h.

◆ rpcsvc_request_queue_t

◆ rpcsvc_request_t

Definition at line 1 of file rpcsvc.h.

◆ rpcsvc_vector_sizer

typedef int(* rpcsvc_vector_sizer) (int state, ssize_t *readsize, char *base_addr, char *curr_addr)

Definition at line 339 of file rpcsvc.h.

Enumeration Type Documentation

◆ rpcsvc_infra_procnum_t

Enumerator
RPCSVC_PROC_EVENT_THREAD_DEATH 

Definition at line 37 of file rpcsvc.h.

Function Documentation

◆ rpcsvc_auth_array()

◆ rpcsvc_auth_check()

◆ rpcsvc_auth_init()

◆ rpcsvc_auth_reconf()

int rpcsvc_auth_reconf ( rpcsvc_t svc,
dict_t options 
)

◆ rpcsvc_auth_request_init()

◆ rpcsvc_auth_transport_init()

int rpcsvc_auth_transport_init ( rpc_transport_t xprt)

◆ rpcsvc_auth_unix_auxgids()

◆ rpcsvc_authenticate()

◆ rpcsvc_autoscale_threads()

void rpcsvc_autoscale_threads ( glusterfs_ctx_t ctx,
rpcsvc_t rpc,
int  incr 
)

◆ rpcsvc_callback_submit()

◆ rpcsvc_create_listeners()

◆ rpcsvc_destroy()

◆ rpcsvc_error_reply()

int rpcsvc_error_reply ( rpcsvc_request_t req)

◆ rpcsvc_get_program_vector_sizer()

rpcsvc_vector_sizer rpcsvc_get_program_vector_sizer ( rpcsvc_t svc,
uint32_t  prognum,
uint32_t  progver,
int  procnum 
)

◆ rpcsvc_get_throttle()

bool rpcsvc_get_throttle ( rpcsvc_t svc)

Definition at line 2735 of file rpcsvc.c.

References _gf_false, and rpcsvc_state::throttle.

Referenced by rpcsvc_request_outstanding().

◆ rpcsvc_init()

◆ rpcsvc_listener_destroy()

◆ rpcsvc_program_actor()

◆ rpcsvc_program_register()

◆ rpcsvc_program_register_portmap()

int rpcsvc_program_register_portmap ( rpcsvc_program_t newprog,
uint32_t  port 
)

◆ rpcsvc_program_unregister()

◆ rpcsvc_program_unregister_portmap()

int rpcsvc_program_unregister_portmap ( rpcsvc_program_t newprog)

◆ rpcsvc_reconfigure_options()

◆ rpcsvc_register_notify()

◆ rpcsvc_register_portmap_enabled()

int rpcsvc_register_portmap_enabled ( rpcsvc_t svc)

Definition at line 1744 of file rpcsvc.c.

References rpcsvc_state::register_portmap.

Referenced by nfs_init_state(), and reconfigure().

◆ rpcsvc_request_attach_vector()

int rpcsvc_request_attach_vector ( rpcsvc_request_t req,
struct iovec  msgvec,
struct iobuf iob,
struct iobref ioref,
int  finalvector 
)

◆ rpcsvc_request_submit()

int rpcsvc_request_submit ( rpcsvc_t rpc,
rpc_transport_t trans,
rpcsvc_cbk_program_t prog,
int  procnum,
void *  req,
glusterfs_ctx_t ctx,
xdrproc_t  xdrproc 
)

◆ rpcsvc_set_addr_namelookup()

int rpcsvc_set_addr_namelookup ( rpcsvc_t svc,
dict_t options 
)

◆ rpcsvc_set_all_squash()

◆ rpcsvc_set_allow_insecure()

int rpcsvc_set_allow_insecure ( rpcsvc_t svc,
dict_t options 
)

◆ rpcsvc_set_outstanding_rpc_limit()

int rpcsvc_set_outstanding_rpc_limit ( rpcsvc_t svc,
dict_t options,
int  defvalue 
)

◆ rpcsvc_set_root_squash()

◆ rpcsvc_set_throttle_off()

int rpcsvc_set_throttle_off ( rpcsvc_t svc)

Definition at line 2720 of file rpcsvc.c.

References _gf_false, and rpcsvc_state::throttle.

◆ rpcsvc_set_throttle_on()

int rpcsvc_set_throttle_on ( rpcsvc_t svc)

Definition at line 2705 of file rpcsvc.c.

References _gf_true, and rpcsvc_state::throttle.

Referenced by nfs_init_state().

◆ rpcsvc_submit_generic()

◆ rpcsvc_submit_message()

int rpcsvc_submit_message ( rpcsvc_request_t req,
struct iovec *  proghdr,
int  hdrcount,
struct iovec *  payload,
int  payloadcount,
struct iobref iobref 
)

◆ rpcsvc_submit_vectors()

int rpcsvc_submit_vectors ( rpcsvc_request_t req)

◆ rpcsvc_transport_peeraddr()

int rpcsvc_transport_peeraddr ( rpc_transport_t trans,
char *  addrstr,
int  addrlen,
struct sockaddr_storage *  returnsa,
socklen_t  sasize 
)

◆ rpcsvc_transport_peername()

int rpcsvc_transport_peername ( rpc_transport_t trans,
char *  hostname,
int  hostlen 
)

◆ rpcsvc_transport_privport_check()

int rpcsvc_transport_privport_check ( rpcsvc_t svc,
char *  volname,
uint16_t  port 
)

◆ rpcsvc_transport_submit()

int rpcsvc_transport_submit ( rpc_transport_t trans,
struct iovec *  rpchdr,
int  rpchdrcount,
struct iovec *  proghdr,
int  proghdrcount,
struct iovec *  progpayload,
int  progpayloadcount,
struct iobref iobref,
void *  priv 
)

◆ rpcsvc_transport_unix_options_build()

int rpcsvc_transport_unix_options_build ( dict_t options,
char *  filepath 
)

◆ rpcsvc_unregister_notify()

◆ rpcsvc_volume_allowed()

char* rpcsvc_volume_allowed ( dict_t options,
char *  volname 
)
RPC_ROOT_UID
#define RPC_ROOT_UID
Definition: rpcsvc.h:57
RPC_ROOT_GID
#define RPC_ROOT_GID
Definition: rpcsvc.h:58