diff options
23 files changed, 611 insertions, 607 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c index 3072d6979f0..83eb6e788bf 100644 --- a/api/src/glfs-mgmt.c +++ b/api/src/glfs-mgmt.c @@ -164,14 +164,14 @@ out: return ret; } -rpcclnt_cb_actor_t mgmt_cbk_actors[GF_CBK_MAXVALUE] = { - [GF_CBK_FETCHSPEC] = {"FETCHSPEC", GF_CBK_FETCHSPEC, mgmt_cbk_spec}, - [GF_CBK_EVENT_NOTIFY] = {"EVENTNOTIFY", GF_CBK_EVENT_NOTIFY, - mgmt_cbk_event}, - [GF_CBK_STATEDUMP] = {"STATEDUMP", GF_CBK_STATEDUMP, mgmt_cbk_statedump}, +static rpcclnt_cb_actor_t mgmt_cbk_actors[GF_CBK_MAXVALUE] = { + [GF_CBK_FETCHSPEC] = {"FETCHSPEC", mgmt_cbk_spec, GF_CBK_FETCHSPEC}, + [GF_CBK_EVENT_NOTIFY] = {"EVENTNOTIFY", mgmt_cbk_event, + GF_CBK_EVENT_NOTIFY}, + [GF_CBK_STATEDUMP] = {"STATEDUMP", mgmt_cbk_statedump, GF_CBK_STATEDUMP}, }; -struct rpcclnt_cb_program mgmt_cbk_prog = { +static struct rpcclnt_cb_program mgmt_cbk_prog = { .progname = "GlusterFS Callback", .prognum = GLUSTER_CBK_PROGRAM, .progver = GLUSTER_CBK_VERSION, @@ -179,7 +179,7 @@ struct rpcclnt_cb_program mgmt_cbk_prog = { .numactors = GF_CBK_MAXVALUE, }; -char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { +static char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { [GF_HNDSK_NULL] = "NULL", [GF_HNDSK_SETVOLUME] = "SETVOLUME", [GF_HNDSK_GETSPEC] = "GETSPEC", @@ -188,7 +188,7 @@ char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { [GF_HNDSK_GET_VOLUME_INFO] = "GETVOLUMEINFO", }; -rpc_clnt_prog_t clnt_handshake_prog = { +static rpc_clnt_prog_t clnt_handshake_prog = { .progname = "GlusterFS Handshake", .prognum = GLUSTER_HNDSK_PROGRAM, .progver = GLUSTER_HNDSK_VERSION, diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index a6b1a15e7cc..0d1629a4d24 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -2015,14 +2015,14 @@ glusterfs_handle_rpc_msg(rpcsvc_request_t *req) return ret; } -rpcclnt_cb_actor_t mgmt_cbk_actors[GF_CBK_MAXVALUE] = { - [GF_CBK_FETCHSPEC] = {"FETCHSPEC", GF_CBK_FETCHSPEC, mgmt_cbk_spec}, - [GF_CBK_EVENT_NOTIFY] = {"EVENTNOTIFY", GF_CBK_EVENT_NOTIFY, - mgmt_cbk_event}, - [GF_CBK_STATEDUMP] = {"STATEDUMP", GF_CBK_STATEDUMP, mgmt_cbk_event}, +static rpcclnt_cb_actor_t mgmt_cbk_actors[GF_CBK_MAXVALUE] = { + [GF_CBK_FETCHSPEC] = {"FETCHSPEC", mgmt_cbk_spec, GF_CBK_FETCHSPEC}, + [GF_CBK_EVENT_NOTIFY] = {"EVENTNOTIFY", mgmt_cbk_event, + GF_CBK_EVENT_NOTIFY}, + [GF_CBK_STATEDUMP] = {"STATEDUMP", mgmt_cbk_event, GF_CBK_STATEDUMP}, }; -struct rpcclnt_cb_program mgmt_cbk_prog = { +static struct rpcclnt_cb_program mgmt_cbk_prog = { .progname = "GlusterFS Callback", .prognum = GLUSTER_CBK_PROGRAM, .progver = GLUSTER_CBK_VERSION, @@ -2030,7 +2030,7 @@ struct rpcclnt_cb_program mgmt_cbk_prog = { .numactors = GF_CBK_MAXVALUE, }; -char *clnt_pmap_procs[GF_PMAP_MAXVALUE] = { +static char *clnt_pmap_procs[GF_PMAP_MAXVALUE] = { [GF_PMAP_NULL] = "NULL", [GF_PMAP_PORTBYBRICK] = "PORTBYBRICK", [GF_PMAP_BRICKBYPORT] = "BRICKBYPORT", @@ -2039,14 +2039,14 @@ char *clnt_pmap_procs[GF_PMAP_MAXVALUE] = { [GF_PMAP_SIGNUP] = "SIGNUP", /* DEPRECATED - DON'T USE! */ }; -rpc_clnt_prog_t clnt_pmap_prog = { +static rpc_clnt_prog_t clnt_pmap_prog = { .progname = "Gluster Portmap", .prognum = GLUSTER_PMAP_PROGRAM, .progver = GLUSTER_PMAP_VERSION, .procnames = clnt_pmap_procs, }; -char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { +static char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { [GF_HNDSK_NULL] = "NULL", [GF_HNDSK_SETVOLUME] = "SETVOLUME", [GF_HNDSK_GETSPEC] = "GETSPEC", @@ -2054,57 +2054,55 @@ char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { [GF_HNDSK_EVENT_NOTIFY] = "EVENTNOTIFY", }; -rpc_clnt_prog_t clnt_handshake_prog = { +static rpc_clnt_prog_t clnt_handshake_prog = { .progname = "GlusterFS Handshake", .prognum = GLUSTER_HNDSK_PROGRAM, .progver = GLUSTER_HNDSK_VERSION, .procnames = clnt_handshake_procs, }; -rpcsvc_actor_t glusterfs_actors[GLUSTERD_BRICK_MAXVALUE] = { - [GLUSTERD_BRICK_NULL] = {"NULL", GLUSTERD_BRICK_NULL, - glusterfs_handle_rpc_msg, NULL, 0, DRC_NA}, - [GLUSTERD_BRICK_TERMINATE] = {"TERMINATE", GLUSTERD_BRICK_TERMINATE, - glusterfs_handle_terminate, NULL, 0, DRC_NA}, +static rpcsvc_actor_t glusterfs_actors[GLUSTERD_BRICK_MAXVALUE] = { + [GLUSTERD_BRICK_NULL] = {"NULL", glusterfs_handle_rpc_msg, NULL, + GLUSTERD_BRICK_NULL, DRC_NA, 0}, + [GLUSTERD_BRICK_TERMINATE] = {"TERMINATE", glusterfs_handle_terminate, NULL, + GLUSTERD_BRICK_TERMINATE, DRC_NA, 0}, [GLUSTERD_BRICK_XLATOR_INFO] = {"TRANSLATOR INFO", - GLUSTERD_BRICK_XLATOR_INFO, glusterfs_handle_translator_info_get, NULL, - 0, DRC_NA}, - [GLUSTERD_BRICK_XLATOR_OP] = {"TRANSLATOR OP", GLUSTERD_BRICK_XLATOR_OP, - glusterfs_handle_translator_op, NULL, 0, - DRC_NA}, - [GLUSTERD_BRICK_STATUS] = {"STATUS", GLUSTERD_BRICK_STATUS, - glusterfs_handle_brick_status, NULL, 0, DRC_NA}, + GLUSTERD_BRICK_XLATOR_INFO, DRC_NA, 0}, + [GLUSTERD_BRICK_XLATOR_OP] = {"TRANSLATOR OP", + glusterfs_handle_translator_op, NULL, + GLUSTERD_BRICK_XLATOR_OP, DRC_NA, 0}, + [GLUSTERD_BRICK_STATUS] = {"STATUS", glusterfs_handle_brick_status, NULL, + GLUSTERD_BRICK_STATUS, DRC_NA, 0}, [GLUSTERD_BRICK_XLATOR_DEFRAG] = {"TRANSLATOR DEFRAG", - GLUSTERD_BRICK_XLATOR_DEFRAG, - glusterfs_handle_defrag, NULL, 0, DRC_NA}, - [GLUSTERD_NODE_PROFILE] = {"NFS PROFILE", GLUSTERD_NODE_PROFILE, - glusterfs_handle_nfs_profile, NULL, 0, DRC_NA}, - [GLUSTERD_NODE_STATUS] = {"NFS STATUS", GLUSTERD_NODE_STATUS, - glusterfs_handle_node_status, NULL, 0, DRC_NA}, + glusterfs_handle_defrag, NULL, + GLUSTERD_BRICK_XLATOR_DEFRAG, DRC_NA, 0}, + [GLUSTERD_NODE_PROFILE] = {"NFS PROFILE", glusterfs_handle_nfs_profile, + NULL, GLUSTERD_NODE_PROFILE, DRC_NA, 0}, + [GLUSTERD_NODE_STATUS] = {"NFS STATUS", glusterfs_handle_node_status, NULL, + GLUSTERD_NODE_STATUS, DRC_NA, 0}, [GLUSTERD_VOLUME_BARRIER_OP] = {"VOLUME BARRIER OP", - GLUSTERD_VOLUME_BARRIER_OP, - glusterfs_handle_volume_barrier_op, NULL, 0, - DRC_NA}, - [GLUSTERD_BRICK_BARRIER] = {"BARRIER", GLUSTERD_BRICK_BARRIER, - glusterfs_handle_barrier, NULL, 0, DRC_NA}, - [GLUSTERD_NODE_BITROT] = {"BITROT", GLUSTERD_NODE_BITROT, - glusterfs_handle_bitrot, NULL, 0, DRC_NA}, - [GLUSTERD_BRICK_ATTACH] = {"ATTACH", GLUSTERD_BRICK_ATTACH, - glusterfs_handle_attach, NULL, 0, DRC_NA}, + glusterfs_handle_volume_barrier_op, NULL, + GLUSTERD_VOLUME_BARRIER_OP, DRC_NA, 0}, + [GLUSTERD_BRICK_BARRIER] = {"BARRIER", glusterfs_handle_barrier, NULL, + GLUSTERD_BRICK_BARRIER, DRC_NA, 0}, + [GLUSTERD_NODE_BITROT] = {"BITROT", glusterfs_handle_bitrot, NULL, + GLUSTERD_NODE_BITROT, DRC_NA, 0}, + [GLUSTERD_BRICK_ATTACH] = {"ATTACH", glusterfs_handle_attach, NULL, + GLUSTERD_BRICK_ATTACH, DRC_NA, 0}, - [GLUSTERD_DUMP_METRICS] = {"DUMP METRICS", GLUSTERD_DUMP_METRICS, - glusterfs_handle_dump_metrics, NULL, 0, DRC_NA}, + [GLUSTERD_DUMP_METRICS] = {"DUMP METRICS", glusterfs_handle_dump_metrics, + NULL, GLUSTERD_DUMP_METRICS, DRC_NA, 0}, - [GLUSTERD_SVC_ATTACH] = {"ATTACH CLIENT", GLUSTERD_SVC_ATTACH, - glusterfs_handle_svc_attach, NULL, 0, DRC_NA}, + [GLUSTERD_SVC_ATTACH] = {"ATTACH CLIENT", glusterfs_handle_svc_attach, NULL, + GLUSTERD_SVC_ATTACH, DRC_NA, 0}, - [GLUSTERD_SVC_DETACH] = {"DETACH CLIENT", GLUSTERD_SVC_DETACH, - glusterfs_handle_svc_detach, NULL, 0, DRC_NA}, + [GLUSTERD_SVC_DETACH] = {"DETACH CLIENT", glusterfs_handle_svc_detach, NULL, + GLUSTERD_SVC_DETACH, DRC_NA, 0}, }; -struct rpcsvc_program glusterfs_mop_prog = { +static struct rpcsvc_program glusterfs_mop_prog = { .progname = "Gluster Brick operations", .prognum = GD_BRICK_PROGRAM, .progver = GD_BRICK_VERSION, diff --git a/rpc/rpc-lib/src/rpc-clnt.h b/rpc/rpc-lib/src/rpc-clnt.h index 1d3274bbddd..0d0b115578c 100644 --- a/rpc/rpc-lib/src/rpc-clnt.h +++ b/rpc/rpc-lib/src/rpc-clnt.h @@ -85,8 +85,8 @@ typedef int (*rpcclnt_cb_fn)(struct rpc_clnt *rpc, void *mydata, void *data); */ typedef struct rpcclnt_actor_desc { char procname[32]; - int procnum; rpcclnt_cb_fn actor; + int procnum; } rpcclnt_cb_actor_t; /* Describes a program and its version along with the function pointers @@ -98,8 +98,6 @@ typedef struct rpcclnt_cb_program { int prognum; int progver; rpcclnt_cb_actor_t *actors; /* All procedure handlers */ - int numactors; /* Num actors in actor array */ - /* Program specific state handed to actors */ void *private; @@ -108,6 +106,8 @@ typedef struct rpcclnt_cb_program { /* Needed for passing back in cb_actor */ void *mydata; + int numactors; /* Num actors in actor array */ + } rpcclnt_cb_program_t; typedef struct rpc_auth_data { @@ -151,17 +151,17 @@ typedef struct rpc_clnt_connection rpc_clnt_connection_t; struct rpc_req { rpc_clnt_connection_t *conn; struct iovec req[2]; - int reqcnt; struct iobref *req_iobref; struct iovec rsp[2]; int rspcnt; + int reqcnt; struct iobref *rsp_iobref; - int rpc_status; - rpc_auth_data_t verf; rpc_clnt_prog_t *prog; - int procnum; + rpc_auth_data_t verf; fop_cbk_fn_t cbkfn; void *conn_private; + int procnum; + int rpc_status; uint32_t xid; }; @@ -182,8 +182,8 @@ typedef struct rpc_clnt { glusterfs_ctx_t *ctx; gf_atomic_t refcount; - int auth_value; xlator_t *owner; + int auth_value; char disabled; } rpc_clnt_t; diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h index 5b88be5a3de..6ca42a77c44 100644 --- a/rpc/rpc-lib/src/rpc-transport.h +++ b/rpc/rpc-lib/src/rpc-transport.h @@ -103,19 +103,19 @@ typedef enum { struct rpc_transport_msg { struct iovec *rpchdr; - int rpchdrcount; struct iovec *proghdr; + int rpchdrcount; int proghdrcount; struct iovec *progpayload; - int progpayloadcount; struct iobref *iobref; + int progpayloadcount; }; typedef struct rpc_transport_msg rpc_transport_msg_t; struct rpc_transport_rsp { struct iovec *rsphdr; - int rsphdr_count; struct iovec *rsp_payload; + int rsphdr_count; int rsp_payload_count; struct iobref *rsp_iobref; }; @@ -149,9 +149,9 @@ typedef struct rpc_transport_data rpc_transport_data_t; struct rpc_request_info { int prognum; int progver; - int procnum; void *rpc_req; /* struct rpc_req */ rpc_transport_rsp_t rsp; + int procnum; uint32_t xid; }; typedef struct rpc_request_info rpc_request_info_t; @@ -193,11 +193,12 @@ struct rpc_transport { int32_t outstanding_rpc_count; struct list_head list; - int bind_insecure; void *dl_handle; /* handle of dlopen() */ char *ssl_name; dict_t *clnt_options; /* store options received from * client */ + gf_atomic_t disconnect_progress; + int bind_insecure; /* connect_failed: saves the connect() syscall status as socket_t * member holding connect() status can't be accessed by higher gfapi * layer or in client management notification handler functions @@ -205,18 +206,17 @@ struct rpc_transport { gf_boolean_t connect_failed; char notify_poller_death; char poller_death_accept; - gf_atomic_t disconnect_progress; }; struct rpc_transport_pollin { struct rpc_transport *trans; - int count; void *private; struct iobref *iobref; struct iovec vector[MAX_IOVEC]; + gf_async_t async; + int count; char is_reply; char vectored; - gf_async_t async; }; typedef struct rpc_transport_pollin rpc_transport_pollin_t; diff --git a/rpc/rpc-lib/src/rpcsvc-common.h b/rpc/rpc-lib/src/rpcsvc-common.h index 734601eef0b..6c4ec49a6ef 100644 --- a/rpc/rpc-lib/src/rpcsvc-common.h +++ b/rpc/rpc-lib/src/rpcsvc-common.h @@ -39,8 +39,6 @@ typedef struct rpcsvc_state { pthread_rwlock_t rpclock; - unsigned int memfactor; - /* List of the authentication schemes available. */ struct list_head authschemes; @@ -61,6 +59,8 @@ typedef struct rpcsvc_state { struct list_head notify; int notify_count; + unsigned int memfactor; + xlator_t *xl; /* xlator */ void *mydata; rpcsvc_notify_t notifyfn; diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 5639abbb204..2818f62e619 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -41,7 +41,7 @@ #include "xdr-rpcclnt.h" #include <glusterfs/glusterfs-acl.h> -struct rpcsvc_program gluster_dump_prog; +static struct rpcsvc_program gluster_dump_prog; #define rpcsvc_alloc_request(svc, request) \ do { \ @@ -3227,13 +3227,13 @@ out: return ret; } -rpcsvc_actor_t gluster_dump_actors[GF_DUMP_MAXVALUE] = { - [GF_DUMP_NULL] = {"NULL", GF_DUMP_NULL, NULL, NULL, 0, DRC_NA}, - [GF_DUMP_DUMP] = {"DUMP", GF_DUMP_DUMP, rpcsvc_dump, NULL, 0, DRC_NA}, - [GF_DUMP_PING] = {"PING", GF_DUMP_PING, rpcsvc_ping, NULL, 0, DRC_NA}, +static rpcsvc_actor_t gluster_dump_actors[GF_DUMP_MAXVALUE] = { + [GF_DUMP_NULL] = {"NULL", NULL, NULL, GF_DUMP_NULL, DRC_NA, 0}, + [GF_DUMP_DUMP] = {"DUMP", rpcsvc_dump, NULL, GF_DUMP_DUMP, DRC_NA, 0}, + [GF_DUMP_PING] = {"PING", rpcsvc_ping, NULL, GF_DUMP_PING, DRC_NA, 0}, }; -struct rpcsvc_program gluster_dump_prog = { +static struct rpcsvc_program gluster_dump_prog = { .progname = "GF-DUMP", .prognum = GLUSTER_DUMP_PROGRAM, .progver = GLUSTER_DUMP_VERSION, diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index f6a02d6759f..a88fc841b60 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -190,24 +190,11 @@ struct rpcsvc_request { * by the program actors. This is the buffer that will need to * be de-xdred by the actor. */ - struct iovec msg[MAX_IOVEC]; int count; + struct iovec msg[MAX_IOVEC]; struct iobref *iobref; - /* Status of the RPC call, whether it was accepted or denied. */ - int rpc_status; - - /* In case, the call was denied, the RPC error is stored here - * till the reply is sent. - */ - int rpc_err; - - /* In case the failure happened because of an authentication problem - * , this value needs to be assigned the correct auth error number. - */ - int auth_err; - /* There can be cases of RPC requests where the reply needs to * be built from multiple sources. E.g. where even the NFS reply * can contain a payload, as in the NFSv3 read reply. Here the RPC header @@ -245,6 +232,19 @@ struct rpcsvc_request { /* request queue in rpcsvc */ struct list_head request_list; + /* Status of the RPC call, whether it was accepted or denied. */ + int rpc_status; + + /* In case, the call was denied, the RPC error is stored here + * till the reply is sent. + */ + int rpc_err; + + /* In case the failure happened because of an authentication problem + * , this value needs to be assigned the correct auth error number. + */ + int auth_err; + /* Things passed to rpc layer from client */ /* @flags: Can be used for binary data passed in xdata to be @@ -357,7 +357,6 @@ typedef void (*rpcsvc_deallocate_reply)(void *msg); */ typedef struct rpcsvc_actor_desc { char procname[RPCSVC_NAME_MAX]; - int procnum; rpcsvc_actor actor; /* Handler for cases where the RPC requests fragments are large enough @@ -370,18 +369,20 @@ typedef struct rpcsvc_actor_desc { */ rpcsvc_vector_sizer vector_sizer; + int procnum; + /* Can actor be ran on behalf an unprivileged requestor? */ - gf_boolean_t unprivileged; drc_op_type_t op_type; + gf_boolean_t unprivileged; } rpcsvc_actor_t; typedef struct rpcsvc_request_queue { - int gen; struct list_head request_queue; pthread_mutex_t queue_lock; pthread_cond_t queue_cond; pthread_t thread; struct rpcsvc_program *program; + int gen; gf_boolean_t waiting; } rpcsvc_request_queue_t; @@ -416,8 +417,6 @@ struct rpcsvc_program { int numactors; /* Num actors in actor array */ int proghighvers; /* Highest ver for program supported by the system. */ - int proglowvers; /* Lowest ver */ - /* Program specific state handed to actors */ void *private; @@ -429,6 +428,8 @@ struct rpcsvc_program { */ rpcsvc_notify_t notify; + int proglowvers; /* Lowest ver */ + /* An integer that identifies the min auth strength that is required * by this protocol, for eg. MOUNT3 needs AUTH_UNIX at least. * See RFC 1813, Section 5.2.1. @@ -438,7 +439,6 @@ struct rpcsvc_program { /* list member to link to list of registered services with rpcsvc */ struct list_head program; rpcsvc_request_queue_t request_queue[EVENT_MAX_THREADS]; - char request_queue_status[EVENT_MAX_THREADS / 8 + 1]; pthread_mutex_t thr_lock; pthread_cond_t thr_cond; int threadcount; @@ -457,6 +457,7 @@ struct rpcsvc_program { gf_boolean_t alive; gf_boolean_t synctask; + char request_queue_status[EVENT_MAX_THREADS / 8 + 1]; }; typedef struct rpcsvc_cbk_program { @@ -588,9 +589,9 @@ typedef struct rpcsvc_auth_ops { typedef struct rpcsvc_auth_flavour_desc { char authname[RPCSVC_NAME_MAX]; - int authnum; rpcsvc_auth_ops_t *authops; void *authprivate; + int authnum; } rpcsvc_auth_t; typedef void *(*rpcsvc_auth_initer_t)(rpcsvc_t *svc, dict_t *options); diff --git a/xlators/features/changelog/lib/src/gf-changelog-reborp.c b/xlators/features/changelog/lib/src/gf-changelog-reborp.c index 4ccf042cc92..56b11cbb705 100644 --- a/xlators/features/changelog/lib/src/gf-changelog-reborp.c +++ b/xlators/features/changelog/lib/src/gf-changelog-reborp.c @@ -22,7 +22,7 @@ * initiator is PROBER, data transfer is REBORP. */ -struct rpcsvc_program *gf_changelog_reborp_programs[]; +static struct rpcsvc_program *gf_changelog_reborp_programs[]; void * gf_changelog_connection_janitor(void *arg) @@ -386,11 +386,10 @@ gf_changelog_reborp_handle_event(rpcsvc_request_t *req) return gf_changelog_event_handler(req, this, entry); } -rpcsvc_actor_t gf_changelog_reborp_actors[CHANGELOG_REV_PROC_MAX] = { +static rpcsvc_actor_t gf_changelog_reborp_actors[CHANGELOG_REV_PROC_MAX] = { [CHANGELOG_REV_PROC_EVENT] = {"CHANGELOG EVENT HANDLER", - CHANGELOG_REV_PROC_EVENT, - gf_changelog_reborp_handle_event, NULL, 0, - DRC_NA}, + gf_changelog_reborp_handle_event, NULL, + CHANGELOG_REV_PROC_EVENT, DRC_NA, 0}, }; /** @@ -399,7 +398,7 @@ rpcsvc_actor_t gf_changelog_reborp_actors[CHANGELOG_REV_PROC_MAX] = { * and that's required to invoke the callback with the appropriate * brick path and it's private data. */ -struct rpcsvc_program gf_changelog_reborp_prog = { +static struct rpcsvc_program gf_changelog_reborp_prog = { .progname = "LIBGFCHANGELOG REBORP", .prognum = CHANGELOG_REV_RPC_PROCNUM, .progver = CHANGELOG_REV_RPC_PROCVER, @@ -408,7 +407,7 @@ struct rpcsvc_program gf_changelog_reborp_prog = { .synctask = _gf_false, }; -struct rpcsvc_program *gf_changelog_reborp_programs[] = { +static struct rpcsvc_program *gf_changelog_reborp_programs[] = { &gf_changelog_reborp_prog, NULL, }; diff --git a/xlators/features/changelog/src/changelog-rpc.c b/xlators/features/changelog/src/changelog-rpc.c index c29c8ea345a..c460c6c501b 100644 --- a/xlators/features/changelog/src/changelog-rpc.c +++ b/xlators/features/changelog/src/changelog-rpc.c @@ -13,7 +13,7 @@ #include "changelog-mem-types.h" #include "changelog-ev-handle.h" -struct rpcsvc_program *changelog_programs[]; +static struct rpcsvc_program *changelog_programs[]; static void changelog_cleanup_dispatchers(xlator_t *this, changelog_priv_t *priv, int count) @@ -420,13 +420,13 @@ submit_rpc: * RPC declarations */ -rpcsvc_actor_t changelog_svc_actors[CHANGELOG_RPC_PROC_MAX] = { +static rpcsvc_actor_t changelog_svc_actors[CHANGELOG_RPC_PROC_MAX] = { [CHANGELOG_RPC_PROBE_FILTER] = {"CHANGELOG PROBE FILTER", - CHANGELOG_RPC_PROBE_FILTER, - changelog_handle_probe, NULL, 0, DRC_NA}, + changelog_handle_probe, NULL, + CHANGELOG_RPC_PROBE_FILTER, DRC_NA, 0}, }; -struct rpcsvc_program changelog_svc_prog = { +static struct rpcsvc_program changelog_svc_prog = { .progname = CHANGELOG_RPC_PROGNAME, .prognum = CHANGELOG_RPC_PROGNUM, .progver = CHANGELOG_RPC_PROGVER, @@ -435,7 +435,7 @@ struct rpcsvc_program changelog_svc_prog = { .synctask = _gf_true, }; -struct rpcsvc_program *changelog_programs[] = { +static struct rpcsvc_program *changelog_programs[] = { &changelog_svc_prog, NULL, }; diff --git a/xlators/features/quota/src/quotad-aggregator.c b/xlators/features/quota/src/quotad-aggregator.c index 15b482503e3..75d47867b5b 100644 --- a/xlators/features/quota/src/quotad-aggregator.c +++ b/xlators/features/quota/src/quotad-aggregator.c @@ -20,7 +20,7 @@ static char *qd_ext_xattrs[] = { NULL, }; -struct rpcsvc_program quotad_aggregator_prog; +static struct rpcsvc_program quotad_aggregator_prog; struct iobuf * quotad_serialize_reply(rpcsvc_request_t *req, void *arg, struct iovec *outmsg, @@ -478,15 +478,15 @@ out: return ret; } -rpcsvc_actor_t quotad_aggregator_actors[GF_AGGREGATOR_MAXVALUE] = { - [GF_AGGREGATOR_NULL] = {"NULL", GF_AGGREGATOR_NULL, NULL, NULL, 0, DRC_NA}, - [GF_AGGREGATOR_LOOKUP] = {"LOOKUP", GF_AGGREGATOR_NULL, - quotad_aggregator_lookup, NULL, 0, DRC_NA}, - [GF_AGGREGATOR_GETLIMIT] = {"GETLIMIT", GF_AGGREGATOR_GETLIMIT, - quotad_aggregator_getlimit, NULL, 0, DRC_NA}, +static rpcsvc_actor_t quotad_aggregator_actors[GF_AGGREGATOR_MAXVALUE] = { + [GF_AGGREGATOR_NULL] = {"NULL", NULL, NULL, GF_AGGREGATOR_NULL, DRC_NA, 0}, + [GF_AGGREGATOR_LOOKUP] = {"LOOKUP", quotad_aggregator_lookup, NULL, + GF_AGGREGATOR_NULL, DRC_NA, 0}, + [GF_AGGREGATOR_GETLIMIT] = {"GETLIMIT", quotad_aggregator_getlimit, NULL, + GF_AGGREGATOR_GETLIMIT, DRC_NA, 0}, }; -struct rpcsvc_program quotad_aggregator_prog = { +static struct rpcsvc_program quotad_aggregator_prog = { .progname = "GlusterFS 3.3", .prognum = GLUSTER_AGGREGATOR_PROGRAM, .progver = GLUSTER_AGGREGATOR_VERSION, diff --git a/xlators/features/snapview-server/src/snapview-server-mgmt.c b/xlators/features/snapview-server/src/snapview-server-mgmt.c index 349c4f8d2d2..d903322424e 100644 --- a/xlators/features/snapview-server/src/snapview-server-mgmt.c +++ b/xlators/features/snapview-server/src/snapview-server-mgmt.c @@ -26,11 +26,11 @@ mgmt_cbk_snap(struct rpc_clnt *rpc, void *mydata, void *data) return 0; } -rpcclnt_cb_actor_t svs_cbk_actors[GF_CBK_MAXVALUE] = { - [GF_CBK_GET_SNAPS] = {"GETSNAPS", GF_CBK_GET_SNAPS, mgmt_cbk_snap}, +static rpcclnt_cb_actor_t svs_cbk_actors[GF_CBK_MAXVALUE] = { + [GF_CBK_GET_SNAPS] = {"GETSNAPS", mgmt_cbk_snap, GF_CBK_GET_SNAPS}, }; -struct rpcclnt_cb_program svs_cbk_prog = { +static struct rpcclnt_cb_program svs_cbk_prog = { .progname = "GlusterFS Callback", .prognum = GLUSTER_CBK_PROGRAM, .progver = GLUSTER_CBK_VERSION, @@ -38,12 +38,12 @@ struct rpcclnt_cb_program svs_cbk_prog = { .numactors = GF_CBK_MAXVALUE, }; -char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { +static char *clnt_handshake_procs[GF_HNDSK_MAXVALUE] = { [GF_HNDSK_NULL] = "NULL", [GF_HNDSK_EVENT_NOTIFY] = "EVENTNOTIFY", }; -rpc_clnt_prog_t svs_clnt_handshake_prog = { +static rpc_clnt_prog_t svs_clnt_handshake_prog = { .progname = "GlusterFS Handshake", .prognum = GLUSTER_HNDSK_PROGRAM, .progver = GLUSTER_HNDSK_VERSION, diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 0493612d1da..b390f6e65e1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -6359,20 +6359,26 @@ glusterd_null(rpcsvc_request_t *req) return 0; } -rpcsvc_actor_t gd_svc_mgmt_actors[GLUSTERD_MGMT_MAXVALUE] = { - [GLUSTERD_MGMT_NULL] = {"NULL", GLUSTERD_MGMT_NULL, glusterd_null, NULL, 0, - DRC_NA}, - [GLUSTERD_MGMT_CLUSTER_LOCK] = {"CLUSTER_LOCK", GLUSTERD_MGMT_CLUSTER_LOCK, - glusterd_handle_cluster_lock, NULL, 0, - DRC_NA}, +static rpcsvc_actor_t gd_svc_mgmt_actors[GLUSTERD_MGMT_MAXVALUE] = { + [GLUSTERD_MGMT_NULL] = {"NULL", glusterd_null, NULL, GLUSTERD_MGMT_NULL, + DRC_NA, 0}, + [GLUSTERD_MGMT_CLUSTER_LOCK] = {"CLUSTER_LOCK", + glusterd_handle_cluster_lock, NULL, + GLUSTERD_MGMT_CLUSTER_LOCK, DRC_NA, 0}, [GLUSTERD_MGMT_CLUSTER_UNLOCK] = {"CLUSTER_UNLOCK", - GLUSTERD_MGMT_CLUSTER_UNLOCK, - glusterd_handle_cluster_unlock, NULL, 0, - DRC_NA}, - [GLUSTERD_MGMT_STAGE_OP] = {"STAGE_OP", GLUSTERD_MGMT_STAGE_OP, - glusterd_handle_stage_op, NULL, 0, DRC_NA}, - [GLUSTERD_MGMT_COMMIT_OP] = {"COMMIT_OP", GLUSTERD_MGMT_COMMIT_OP, - glusterd_handle_commit_op, NULL, 0, DRC_NA}, + glusterd_handle_cluster_unlock, NULL, + GLUSTERD_MGMT_CLUSTER_UNLOCK, DRC_NA, 0}, + [GLUSTERD_MGMT_STAGE_OP] = {"STAGE_OP", glusterd_handle_stage_op, NULL, + GLUSTERD_MGMT_STAGE_OP, DRC_NA, 0}, + [GLUSTERD_MGMT_COMMIT_OP] = + { + "COMMIT_OP", + glusterd_handle_commit_op, + NULL, + GLUSTERD_MGMT_COMMIT_OP, + DRC_NA, + 0, + }, }; struct rpcsvc_program gd_svc_mgmt_prog = { @@ -6384,19 +6390,18 @@ struct rpcsvc_program gd_svc_mgmt_prog = { .synctask = _gf_true, }; -rpcsvc_actor_t gd_svc_peer_actors[GLUSTERD_FRIEND_MAXVALUE] = { - [GLUSTERD_FRIEND_NULL] = {"NULL", GLUSTERD_MGMT_NULL, glusterd_null, NULL, - 0, DRC_NA}, - [GLUSTERD_PROBE_QUERY] = {"PROBE_QUERY", GLUSTERD_PROBE_QUERY, - glusterd_handle_probe_query, NULL, 0, DRC_NA}, - [GLUSTERD_FRIEND_ADD] = {"FRIEND_ADD", GLUSTERD_FRIEND_ADD, - glusterd_handle_incoming_friend_req, NULL, 0, - DRC_NA}, - [GLUSTERD_FRIEND_REMOVE] = {"FRIEND_REMOVE", GLUSTERD_FRIEND_REMOVE, - glusterd_handle_incoming_unfriend_req, NULL, 0, - DRC_NA}, - [GLUSTERD_FRIEND_UPDATE] = {"FRIEND_UPDATE", GLUSTERD_FRIEND_UPDATE, - glusterd_handle_friend_update, NULL, 0, DRC_NA}, +static rpcsvc_actor_t gd_svc_peer_actors[GLUSTERD_FRIEND_MAXVALUE] = { + [GLUSTERD_FRIEND_NULL] = {"NULL", glusterd_null, NULL, GLUSTERD_MGMT_NULL, + DRC_NA, 0}, + [GLUSTERD_PROBE_QUERY] = {"PROBE_QUERY", glusterd_handle_probe_query, NULL, + GLUSTERD_PROBE_QUERY, DRC_NA, 0}, + [GLUSTERD_FRIEND_ADD] = {"FRIEND_ADD", glusterd_handle_incoming_friend_req, + NULL, GLUSTERD_FRIEND_ADD, DRC_NA, 0}, + [GLUSTERD_FRIEND_REMOVE] = {"FRIEND_REMOVE", + glusterd_handle_incoming_unfriend_req, NULL, + GLUSTERD_FRIEND_REMOVE, DRC_NA, 0}, + [GLUSTERD_FRIEND_UPDATE] = {"FRIEND_UPDATE", glusterd_handle_friend_update, + NULL, GLUSTERD_FRIEND_UPDATE, DRC_NA, 0}, }; struct rpcsvc_program gd_svc_peer_prog = { @@ -6408,118 +6413,109 @@ struct rpcsvc_program gd_svc_peer_prog = { .synctask = _gf_false, }; -rpcsvc_actor_t gd_svc_cli_actors[GLUSTER_CLI_MAXVALUE] = { - [GLUSTER_CLI_PROBE] = {"CLI_PROBE", GLUSTER_CLI_PROBE, - glusterd_handle_cli_probe, NULL, 0, DRC_NA}, +static rpcsvc_actor_t gd_svc_cli_actors[GLUSTER_CLI_MAXVALUE] = { + [GLUSTER_CLI_PROBE] = {"CLI_PROBE", glusterd_handle_cli_probe, NULL, + GLUSTER_CLI_PROBE, DRC_NA, 0}, [GLUSTER_CLI_CREATE_VOLUME] = {"CLI_CREATE_VOLUME", - GLUSTER_CLI_CREATE_VOLUME, - glusterd_handle_create_volume, NULL, 0, - DRC_NA}, + glusterd_handle_create_volume, NULL, + GLUSTER_CLI_CREATE_VOLUME, DRC_NA, 0}, [GLUSTER_CLI_DEFRAG_VOLUME] = {"CLI_DEFRAG_VOLUME", - GLUSTER_CLI_DEFRAG_VOLUME, - glusterd_handle_defrag_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_DEPROBE] = {"FRIEND_REMOVE", GLUSTER_CLI_DEPROBE, - glusterd_handle_cli_deprobe, NULL, 0, DRC_NA}, - [GLUSTER_CLI_LIST_FRIENDS] = {"LIST_FRIENDS", GLUSTER_CLI_LIST_FRIENDS, - glusterd_handle_cli_list_friends, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_UUID_RESET] = {"UUID_RESET", GLUSTER_CLI_UUID_RESET, - glusterd_handle_cli_uuid_reset, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_UUID_GET] = {"UUID_GET", GLUSTER_CLI_UUID_GET, - glusterd_handle_cli_uuid_get, NULL, 0, DRC_NA}, - [GLUSTER_CLI_START_VOLUME] = {"START_VOLUME", GLUSTER_CLI_START_VOLUME, - glusterd_handle_cli_start_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_STOP_VOLUME] = {"STOP_VOLUME", GLUSTER_CLI_STOP_VOLUME, - glusterd_handle_cli_stop_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_DELETE_VOLUME] = {"DELETE_VOLUME", GLUSTER_CLI_DELETE_VOLUME, - glusterd_handle_cli_delete_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_GET_VOLUME] = {"GET_VOLUME", GLUSTER_CLI_GET_VOLUME, - glusterd_handle_cli_get_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_ADD_BRICK] = {"ADD_BRICK", GLUSTER_CLI_ADD_BRICK, - glusterd_handle_add_brick, NULL, 0, DRC_NA}, - [GLUSTER_CLI_ATTACH_TIER] = {"ATTACH_TIER", GLUSTER_CLI_ATTACH_TIER, - glusterd_handle_attach_tier, NULL, 0, DRC_NA}, - [GLUSTER_CLI_REPLACE_BRICK] = {"REPLACE_BRICK", GLUSTER_CLI_REPLACE_BRICK, - glusterd_handle_replace_brick, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_REMOVE_BRICK] = {"REMOVE_BRICK", GLUSTER_CLI_REMOVE_BRICK, - glusterd_handle_remove_brick, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_LOG_ROTATE] = {"LOG FILENAME", GLUSTER_CLI_LOG_ROTATE, - glusterd_handle_log_rotate, NULL, 0, DRC_NA}, - [GLUSTER_CLI_SET_VOLUME] = {"SET_VOLUME", GLUSTER_CLI_SET_VOLUME, - glusterd_handle_set_volume, NULL, 0, DRC_NA}, - [GLUSTER_CLI_SYNC_VOLUME] = {"SYNC_VOLUME", GLUSTER_CLI_SYNC_VOLUME, - glusterd_handle_sync_volume, NULL, 0, DRC_NA}, - [GLUSTER_CLI_RESET_VOLUME] = {"RESET_VOLUME", GLUSTER_CLI_RESET_VOLUME, - glusterd_handle_reset_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_FSM_LOG] = {"FSM_LOG", GLUSTER_CLI_FSM_LOG, - glusterd_handle_fsm_log, NULL, 0, DRC_NA}, - [GLUSTER_CLI_GSYNC_SET] = {"GSYNC_SET", GLUSTER_CLI_GSYNC_SET, - glusterd_handle_gsync_set, NULL, 0, DRC_NA}, - [GLUSTER_CLI_PROFILE_VOLUME] = {"STATS_VOLUME", GLUSTER_CLI_PROFILE_VOLUME, - glusterd_handle_cli_profile_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_QUOTA] = {"QUOTA", GLUSTER_CLI_QUOTA, glusterd_handle_quota, - NULL, 0, DRC_NA}, - [GLUSTER_CLI_GETWD] = {"GETWD", GLUSTER_CLI_GETWD, glusterd_handle_getwd, - NULL, 1, DRC_NA}, - [GLUSTER_CLI_STATUS_VOLUME] = {"STATUS_VOLUME", GLUSTER_CLI_STATUS_VOLUME, - glusterd_handle_status_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_MOUNT] = {"MOUNT", GLUSTER_CLI_MOUNT, glusterd_handle_mount, - NULL, 1, DRC_NA}, - [GLUSTER_CLI_UMOUNT] = {"UMOUNT", GLUSTER_CLI_UMOUNT, - glusterd_handle_umount, NULL, 1, DRC_NA}, - [GLUSTER_CLI_HEAL_VOLUME] = {"HEAL_VOLUME", GLUSTER_CLI_HEAL_VOLUME, - glusterd_handle_cli_heal_volume, NULL, 0, - DRC_NA}, + glusterd_handle_defrag_volume, NULL, + GLUSTER_CLI_DEFRAG_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_DEPROBE] = {"FRIEND_REMOVE", glusterd_handle_cli_deprobe, NULL, + GLUSTER_CLI_DEPROBE, DRC_NA, 0}, + [GLUSTER_CLI_LIST_FRIENDS] = {"LIST_FRIENDS", + glusterd_handle_cli_list_friends, NULL, + GLUSTER_CLI_LIST_FRIENDS, DRC_NA, 0}, + [GLUSTER_CLI_UUID_RESET] = {"UUID_RESET", glusterd_handle_cli_uuid_reset, + NULL, GLUSTER_CLI_UUID_RESET, DRC_NA, 0}, + [GLUSTER_CLI_UUID_GET] = {"UUID_GET", glusterd_handle_cli_uuid_get, NULL, + GLUSTER_CLI_UUID_GET, DRC_NA, 0}, + [GLUSTER_CLI_START_VOLUME] = {"START_VOLUME", + glusterd_handle_cli_start_volume, NULL, + GLUSTER_CLI_START_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_STOP_VOLUME] = {"STOP_VOLUME", glusterd_handle_cli_stop_volume, + NULL, GLUSTER_CLI_STOP_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_DELETE_VOLUME] = {"DELETE_VOLUME", + glusterd_handle_cli_delete_volume, NULL, + GLUSTER_CLI_DELETE_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_GET_VOLUME] = {"GET_VOLUME", glusterd_handle_cli_get_volume, + NULL, GLUSTER_CLI_GET_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_ADD_BRICK] = {"ADD_BRICK", glusterd_handle_add_brick, NULL, + GLUSTER_CLI_ADD_BRICK, DRC_NA, 0}, + [GLUSTER_CLI_ATTACH_TIER] = {"ATTACH_TIER", glusterd_handle_attach_tier, + NULL, GLUSTER_CLI_ATTACH_TIER, DRC_NA, 0}, + [GLUSTER_CLI_REPLACE_BRICK] = {"REPLACE_BRICK", + glusterd_handle_replace_brick, NULL, + GLUSTER_CLI_REPLACE_BRICK, DRC_NA, 0}, + [GLUSTER_CLI_REMOVE_BRICK] = {"REMOVE_BRICK", glusterd_handle_remove_brick, + NULL, GLUSTER_CLI_REMOVE_BRICK, DRC_NA, 0}, + [GLUSTER_CLI_LOG_ROTATE] = {"LOG FILENAME", glusterd_handle_log_rotate, + NULL, GLUSTER_CLI_LOG_ROTATE, DRC_NA, 0}, + [GLUSTER_CLI_SET_VOLUME] = {"SET_VOLUME", glusterd_handle_set_volume, NULL, + GLUSTER_CLI_SET_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_SYNC_VOLUME] = {"SYNC_VOLUME", glusterd_handle_sync_volume, + NULL, GLUSTER_CLI_SYNC_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_RESET_VOLUME] = {"RESET_VOLUME", glusterd_handle_reset_volume, + NULL, GLUSTER_CLI_RESET_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_FSM_LOG] = {"FSM_LOG", glusterd_handle_fsm_log, NULL, + GLUSTER_CLI_FSM_LOG, DRC_NA, 0}, + [GLUSTER_CLI_GSYNC_SET] = {"GSYNC_SET", glusterd_handle_gsync_set, NULL, + GLUSTER_CLI_GSYNC_SET, DRC_NA, 0}, + [GLUSTER_CLI_PROFILE_VOLUME] = {"STATS_VOLUME", + glusterd_handle_cli_profile_volume, NULL, + GLUSTER_CLI_PROFILE_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_QUOTA] = {"QUOTA", glusterd_handle_quota, NULL, + GLUSTER_CLI_QUOTA, DRC_NA, 0}, + [GLUSTER_CLI_GETWD] = {"GETWD", glusterd_handle_getwd, NULL, + GLUSTER_CLI_GETWD, DRC_NA, 1}, + [GLUSTER_CLI_STATUS_VOLUME] = {"STATUS_VOLUME", + glusterd_handle_status_volume, NULL, + GLUSTER_CLI_STATUS_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_MOUNT] = {"MOUNT", glusterd_handle_mount, NULL, + GLUSTER_CLI_MOUNT, DRC_NA, 1}, + [GLUSTER_CLI_UMOUNT] = {"UMOUNT", glusterd_handle_umount, NULL, + GLUSTER_CLI_UMOUNT, DRC_NA, 1}, + [GLUSTER_CLI_HEAL_VOLUME] = {"HEAL_VOLUME", glusterd_handle_cli_heal_volume, + NULL, GLUSTER_CLI_HEAL_VOLUME, DRC_NA, 0}, [GLUSTER_CLI_STATEDUMP_VOLUME] = {"STATEDUMP_VOLUME", - GLUSTER_CLI_STATEDUMP_VOLUME, glusterd_handle_cli_statedump_volume, - NULL, 0, DRC_NA}, - [GLUSTER_CLI_LIST_VOLUME] = {"LIST_VOLUME", GLUSTER_CLI_LIST_VOLUME, - glusterd_handle_cli_list_volume, NULL, 0, - DRC_NA}, + NULL, GLUSTER_CLI_STATEDUMP_VOLUME, + DRC_NA, 0}, + [GLUSTER_CLI_LIST_VOLUME] = {"LIST_VOLUME", glusterd_handle_cli_list_volume, + NULL, GLUSTER_CLI_LIST_VOLUME, DRC_NA, 0}, [GLUSTER_CLI_CLRLOCKS_VOLUME] = {"CLEARLOCKS_VOLUME", - GLUSTER_CLI_CLRLOCKS_VOLUME, glusterd_handle_cli_clearlocks_volume, - NULL, 0, DRC_NA}, - [GLUSTER_CLI_COPY_FILE] = {"COPY_FILE", GLUSTER_CLI_COPY_FILE, - glusterd_handle_copy_file, NULL, 0, DRC_NA}, - [GLUSTER_CLI_SYS_EXEC] = {"SYS_EXEC", GLUSTER_CLI_SYS_EXEC, - glusterd_handle_sys_exec, NULL, 0, DRC_NA}, - [GLUSTER_CLI_SNAP] = {"SNAP", GLUSTER_CLI_SNAP, glusterd_handle_snapshot, - NULL, 0, DRC_NA}, - [GLUSTER_CLI_BARRIER_VOLUME] = {"BARRIER_VOLUME", - GLUSTER_CLI_BARRIER_VOLUME, - glusterd_handle_barrier, NULL, 0, DRC_NA}, - [GLUSTER_CLI_GANESHA] = {"GANESHA", GLUSTER_CLI_GANESHA, - glusterd_handle_ganesha_cmd, NULL, 0, DRC_NA}, - [GLUSTER_CLI_GET_VOL_OPT] = {"GET_VOL_OPT", GLUSTER_CLI_GET_VOL_OPT, - glusterd_handle_get_vol_opt, NULL, 0, DRC_NA}, - [GLUSTER_CLI_BITROT] = {"BITROT", GLUSTER_CLI_BITROT, - glusterd_handle_bitrot, NULL, 0, DRC_NA}, - [GLUSTER_CLI_GET_STATE] = {"GET_STATE", GLUSTER_CLI_GET_STATE, - glusterd_handle_get_state, NULL, 0, DRC_NA}, - [GLUSTER_CLI_RESET_BRICK] = {"RESET_BRICK", GLUSTER_CLI_RESET_BRICK, - glusterd_handle_reset_brick, NULL, 0, DRC_NA}, - [GLUSTER_CLI_TIER] = {"TIER", GLUSTER_CLI_TIER, glusterd_handle_tier, NULL, - 0, DRC_NA}, + NULL, GLUSTER_CLI_CLRLOCKS_VOLUME, DRC_NA, + 0}, + [GLUSTER_CLI_COPY_FILE] = {"COPY_FILE", glusterd_handle_copy_file, NULL, + GLUSTER_CLI_COPY_FILE, DRC_NA, 0}, + [GLUSTER_CLI_SYS_EXEC] = {"SYS_EXEC", glusterd_handle_sys_exec, NULL, + GLUSTER_CLI_SYS_EXEC, DRC_NA, 0}, + [GLUSTER_CLI_SNAP] = {"SNAP", glusterd_handle_snapshot, NULL, + GLUSTER_CLI_SNAP, DRC_NA, 0}, + [GLUSTER_CLI_BARRIER_VOLUME] = {"BARRIER_VOLUME", glusterd_handle_barrier, + NULL, GLUSTER_CLI_BARRIER_VOLUME, DRC_NA, + 0}, + [GLUSTER_CLI_GANESHA] = {"GANESHA", glusterd_handle_ganesha_cmd, NULL, + GLUSTER_CLI_GANESHA, DRC_NA, 0}, + [GLUSTER_CLI_GET_VOL_OPT] = {"GET_VOL_OPT", glusterd_handle_get_vol_opt, + NULL, DRC_NA, 0}, + [GLUSTER_CLI_BITROT] = {"BITROT", glusterd_handle_bitrot, NULL, + GLUSTER_CLI_BITROT, DRC_NA, 0}, + [GLUSTER_CLI_GET_STATE] = {"GET_STATE", glusterd_handle_get_state, NULL, + GLUSTER_CLI_GET_STATE, DRC_NA, 0}, + [GLUSTER_CLI_RESET_BRICK] = {"RESET_BRICK", glusterd_handle_reset_brick, + NULL, GLUSTER_CLI_RESET_BRICK, DRC_NA, 0}, + [GLUSTER_CLI_TIER] = {"TIER", glusterd_handle_tier, NULL, GLUSTER_CLI_TIER, + DRC_NA, 0}, [GLUSTER_CLI_REMOVE_TIER_BRICK] = {"REMOVE_TIER_BRICK", - GLUSTER_CLI_REMOVE_TIER_BRICK, - glusterd_handle_tier, NULL, 0, DRC_NA}, + glusterd_handle_tier, NULL, + GLUSTER_CLI_REMOVE_TIER_BRICK, DRC_NA, + 0}, [GLUSTER_CLI_ADD_TIER_BRICK] = {"ADD_TIER_BRICK", - GLUSTER_CLI_ADD_TIER_BRICK, - glusterd_handle_add_tier_brick, NULL, 0, - DRC_NA}, + glusterd_handle_add_tier_brick, NULL, + GLUSTER_CLI_ADD_TIER_BRICK, DRC_NA, 0}, }; struct rpcsvc_program gd_svc_cli_prog = { @@ -6536,27 +6532,25 @@ struct rpcsvc_program gd_svc_cli_prog = { * read only queries, the only exception being MOUNT/UMOUNT which is required * by geo-replication to support unprivileged master -> slave sessions. */ -rpcsvc_actor_t gd_svc_cli_trusted_actors[GLUSTER_CLI_MAXVALUE] = { - [GLUSTER_CLI_LIST_FRIENDS] = {"LIST_FRIENDS", GLUSTER_CLI_LIST_FRIENDS, - glusterd_handle_cli_list_friends, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_UUID_GET] = {"UUID_GET", GLUSTER_CLI_UUID_GET, - glusterd_handle_cli_uuid_get, NULL, 0, DRC_NA}, - [GLUSTER_CLI_GET_VOLUME] = {"GET_VOLUME", GLUSTER_CLI_GET_VOLUME, - glusterd_handle_cli_get_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_GETWD] = {"GETWD", GLUSTER_CLI_GETWD, glusterd_handle_getwd, - NULL, 1, DRC_NA}, - [GLUSTER_CLI_STATUS_VOLUME] = {"STATUS_VOLUME", GLUSTER_CLI_STATUS_VOLUME, - glusterd_handle_status_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_LIST_VOLUME] = {"LIST_VOLUME", GLUSTER_CLI_LIST_VOLUME, - glusterd_handle_cli_list_volume, NULL, 0, - DRC_NA}, - [GLUSTER_CLI_MOUNT] = {"MOUNT", GLUSTER_CLI_MOUNT, glusterd_handle_mount, - NULL, 1, DRC_NA}, - [GLUSTER_CLI_UMOUNT] = {"UMOUNT", GLUSTER_CLI_UMOUNT, - glusterd_handle_umount, NULL, 1, DRC_NA}, +static rpcsvc_actor_t gd_svc_cli_trusted_actors[GLUSTER_CLI_MAXVALUE] = { + [GLUSTER_CLI_LIST_FRIENDS] = {"LIST_FRIENDS", + glusterd_handle_cli_list_friends, NULL, + GLUSTER_CLI_LIST_FRIENDS, DRC_NA, 0}, + [GLUSTER_CLI_UUID_GET] = {"UUID_GET", glusterd_handle_cli_uuid_get, NULL, + GLUSTER_CLI_UUID_GET, DRC_NA, 0}, + [GLUSTER_CLI_GET_VOLUME] = {"GET_VOLUME", glusterd_handle_cli_get_volume, + NULL, GLUSTER_CLI_GET_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_GETWD] = {"GETWD", glusterd_handle_getwd, NULL, + GLUSTER_CLI_GETWD, DRC_NA, 1}, + [GLUSTER_CLI_STATUS_VOLUME] = {"STATUS_VOLUME", + glusterd_handle_status_volume, NULL, + GLUSTER_CLI_STATUS_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_LIST_VOLUME] = {"LIST_VOLUME", glusterd_handle_cli_list_volume, + NULL, GLUSTER_CLI_LIST_VOLUME, DRC_NA, 0}, + [GLUSTER_CLI_MOUNT] = {"MOUNT", glusterd_handle_mount, NULL, + GLUSTER_CLI_MOUNT, DRC_NA, 1}, + [GLUSTER_CLI_UMOUNT] = {"UMOUNT", glusterd_handle_umount, NULL, + GLUSTER_CLI_UMOUNT, DRC_NA, 1}, }; struct rpcsvc_program gd_svc_cli_trusted_progs = { diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index a6cdbcef82c..1671c2481dc 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -1708,16 +1708,16 @@ server_get_snap_info(rpcsvc_request_t *req) return glusterd_big_locked_handler(req, __server_get_snap_info); } -rpcsvc_actor_t gluster_handshake_actors[GF_HNDSK_MAXVALUE] = { - [GF_HNDSK_NULL] = {"NULL", GF_HNDSK_NULL, NULL, NULL, 0, DRC_NA}, - [GF_HNDSK_GETSPEC] = {"GETSPEC", GF_HNDSK_GETSPEC, server_getspec, NULL, 0, - DRC_NA}, - [GF_HNDSK_EVENT_NOTIFY] = {"EVENTNOTIFY", GF_HNDSK_EVENT_NOTIFY, - server_event_notify, NULL, 0, DRC_NA}, - [GF_HNDSK_GET_VOLUME_INFO] = {"GETVOLUMEINFO", GF_HNDSK_GET_VOLUME_INFO, - server_get_volume_info, NULL, 0, DRC_NA}, - [GF_HNDSK_GET_SNAPSHOT_INFO] = {"GETSNAPINFO", GF_HNDSK_GET_SNAPSHOT_INFO, - server_get_snap_info, NULL, 0, DRC_NA}, +static rpcsvc_actor_t gluster_handshake_actors[GF_HNDSK_MAXVALUE] = { + [GF_HNDSK_NULL] = {"NULL", NULL, NULL, GF_HNDSK_NULL, DRC_NA, 0}, + [GF_HNDSK_GETSPEC] = {"GETSPEC", server_getspec, NULL, GF_HNDSK_GETSPEC, + DRC_NA, 0}, + [GF_HNDSK_EVENT_NOTIFY] = {"EVENTNOTIFY", server_event_notify, NULL, + GF_HNDSK_EVENT_NOTIFY, DRC_NA, 0}, + [GF_HNDSK_GET_VOLUME_INFO] = {"GETVOLUMEINFO", server_get_volume_info, NULL, + GF_HNDSK_GET_VOLUME_INFO, DRC_NA, 0}, + [GF_HNDSK_GET_SNAPSHOT_INFO] = {"GETSNAPINFO", server_get_snap_info, NULL, + GF_HNDSK_GET_SNAPSHOT_INFO, DRC_NA, 0}, }; struct rpcsvc_program gluster_handshake_prog = { @@ -1729,9 +1729,9 @@ struct rpcsvc_program gluster_handshake_prog = { }; /* A minimal RPC program just for the cli getspec command */ -rpcsvc_actor_t gluster_cli_getspec_actors[GF_HNDSK_MAXVALUE] = { - [GF_HNDSK_GETSPEC] = {"GETSPEC", GF_HNDSK_GETSPEC, server_getspec, NULL, 0, - DRC_NA}, +static rpcsvc_actor_t gluster_cli_getspec_actors[GF_HNDSK_MAXVALUE] = { + [GF_HNDSK_GETSPEC] = {"GETSPEC", server_getspec, NULL, GF_HNDSK_GETSPEC, + DRC_NA, 0}, }; struct rpcsvc_program gluster_cli_getspec_prog = { @@ -1742,26 +1742,26 @@ struct rpcsvc_program gluster_cli_getspec_prog = { .numactors = GF_HNDSK_MAXVALUE, }; -char *glusterd_dump_proc[GF_DUMP_MAXVALUE] = { +static char *glusterd_dump_proc[GF_DUMP_MAXVALUE] = { [GF_DUMP_NULL] = "NULL", [GF_DUMP_DUMP] = "DUMP", [GF_DUMP_PING] = "PING", }; -rpc_clnt_prog_t glusterd_dump_prog = { +static rpc_clnt_prog_t glusterd_dump_prog = { .progname = "GLUSTERD-DUMP", .prognum = GLUSTER_DUMP_PROGRAM, .progver = GLUSTER_DUMP_VERSION, .procnames = glusterd_dump_proc, }; -rpcsvc_actor_t glusterd_mgmt_hndsk_actors[GD_MGMT_HNDSK_MAXVALUE] = { - [GD_MGMT_HNDSK_NULL] = {"NULL", GD_MGMT_HNDSK_NULL, NULL, NULL, 0, DRC_NA}, - [GD_MGMT_HNDSK_VERSIONS] = {"MGMT-VERS", GD_MGMT_HNDSK_VERSIONS, - glusterd_mgmt_hndsk_versions, NULL, 0, DRC_NA}, - [GD_MGMT_HNDSK_VERSIONS_ACK] = {"MGMT-VERS-ACK", GD_MGMT_HNDSK_VERSIONS_ACK, - glusterd_mgmt_hndsk_versions_ack, NULL, 0, - DRC_NA}, +static rpcsvc_actor_t glusterd_mgmt_hndsk_actors[GD_MGMT_HNDSK_MAXVALUE] = { + [GD_MGMT_HNDSK_NULL] = {"NULL", NULL, NULL, GD_MGMT_HNDSK_NULL, DRC_NA, 0}, + [GD_MGMT_HNDSK_VERSIONS] = {"MGMT-VERS", glusterd_mgmt_hndsk_versions, NULL, + GD_MGMT_HNDSK_VERSIONS, DRC_NA, 0}, + [GD_MGMT_HNDSK_VERSIONS_ACK] = {"MGMT-VERS-ACK", + glusterd_mgmt_hndsk_versions_ack, NULL, + GD_MGMT_HNDSK_VERSIONS_ACK, DRC_NA, 0}, }; struct rpcsvc_program glusterd_mgmt_hndsk_prog = { @@ -1772,13 +1772,13 @@ struct rpcsvc_program glusterd_mgmt_hndsk_prog = { .numactors = GD_MGMT_HNDSK_MAXVALUE, }; -char *glusterd_mgmt_hndsk_proc[GD_MGMT_HNDSK_MAXVALUE] = { +static char *glusterd_mgmt_hndsk_proc[GD_MGMT_HNDSK_MAXVALUE] = { [GD_MGMT_HNDSK_NULL] = "NULL", [GD_MGMT_HNDSK_VERSIONS] = "MGMT-VERS", [GD_MGMT_HNDSK_VERSIONS_ACK] = "MGMT-VERS-ACK", }; -rpc_clnt_prog_t gd_clnt_mgmt_hndsk_prog = { +static rpc_clnt_prog_t gd_clnt_mgmt_hndsk_prog = { .progname = "Gluster MGMT Handshake", .prognum = GD_MGMT_HNDSK_PROGRAM, .progver = GD_MGMT_HNDSK_VERSION, diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c index c8b080cc0ca..ef8b4c38571 100644 --- a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c @@ -966,25 +966,25 @@ glusterd_handle_mgmt_v3_unlock(rpcsvc_request_t *req) return glusterd_big_locked_handler(req, glusterd_handle_mgmt_v3_unlock_fn); } -rpcsvc_actor_t gd_svc_mgmt_v3_actors[GLUSTERD_MGMT_V3_MAXVALUE] = { - [GLUSTERD_MGMT_V3_NULL] = {"NULL", GLUSTERD_MGMT_V3_NULL, - glusterd_mgmt_v3_null, NULL, 0, DRC_NA}, - [GLUSTERD_MGMT_V3_LOCK] = {"MGMT_V3_LOCK", GLUSTERD_MGMT_V3_LOCK, - glusterd_handle_mgmt_v3_lock, NULL, 0, DRC_NA}, - [GLUSTERD_MGMT_V3_PRE_VALIDATE] = {"PRE_VAL", GLUSTERD_MGMT_V3_PRE_VALIDATE, - glusterd_handle_pre_validate, NULL, 0, - DRC_NA}, - [GLUSTERD_MGMT_V3_BRICK_OP] = {"BRCK_OP", GLUSTERD_MGMT_V3_BRICK_OP, - glusterd_handle_brick_op, NULL, 0, DRC_NA}, - [GLUSTERD_MGMT_V3_COMMIT] = {"COMMIT", GLUSTERD_MGMT_V3_COMMIT, - glusterd_handle_commit, NULL, 0, DRC_NA}, +static rpcsvc_actor_t gd_svc_mgmt_v3_actors[GLUSTERD_MGMT_V3_MAXVALUE] = { + [GLUSTERD_MGMT_V3_NULL] = {"NULL", glusterd_mgmt_v3_null, NULL, + GLUSTERD_MGMT_V3_NULL, DRC_NA, 0}, + [GLUSTERD_MGMT_V3_LOCK] = {"MGMT_V3_LOCK", glusterd_handle_mgmt_v3_lock, + NULL, GLUSTERD_MGMT_V3_LOCK, DRC_NA, 0}, + [GLUSTERD_MGMT_V3_PRE_VALIDATE] = {"PRE_VAL", glusterd_handle_pre_validate, + NULL, GLUSTERD_MGMT_V3_PRE_VALIDATE, + DRC_NA, 0}, + [GLUSTERD_MGMT_V3_BRICK_OP] = {"BRCK_OP", glusterd_handle_brick_op, NULL, + GLUSTERD_MGMT_V3_BRICK_OP, DRC_NA, 0}, + [GLUSTERD_MGMT_V3_COMMIT] = {"COMMIT", glusterd_handle_commit, NULL, + GLUSTERD_MGMT_V3_COMMIT, DRC_NA, 0}, [GLUSTERD_MGMT_V3_POST_VALIDATE] = {"POST_VAL", - GLUSTERD_MGMT_V3_POST_VALIDATE, - glusterd_handle_post_validate, NULL, 0, - DRC_NA}, - [GLUSTERD_MGMT_V3_UNLOCK] = {"MGMT_V3_UNLOCK", GLUSTERD_MGMT_V3_UNLOCK, - glusterd_handle_mgmt_v3_unlock, NULL, 0, - DRC_NA}, + glusterd_handle_post_validate, NULL, + GLUSTERD_MGMT_V3_POST_VALIDATE, DRC_NA, + 0}, + [GLUSTERD_MGMT_V3_UNLOCK] = {"MGMT_V3_UNLOCK", + glusterd_handle_mgmt_v3_unlock, NULL, + GLUSTERD_MGMT_V3_UNLOCK, DRC_NA, 0}, }; struct rpcsvc_program gd_svc_mgmt_v3_prog = { diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.c b/xlators/mgmt/glusterd/src/glusterd-pmap.c index e54596e0001..ec5bd1137f1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-pmap.c +++ b/xlators/mgmt/glusterd/src/glusterd-pmap.c @@ -635,16 +635,16 @@ gluster_pmap_signout(rpcsvc_request_t *req) return glusterd_big_locked_handler(req, __gluster_pmap_signout); } -rpcsvc_actor_t gluster_pmap_actors[GF_PMAP_MAXVALUE] = { - [GF_PMAP_NULL] = {"NULL", GF_PMAP_NULL, NULL, NULL, 0, DRC_NA}, - [GF_PMAP_PORTBYBRICK] = {"PORTBYBRICK", GF_PMAP_PORTBYBRICK, - gluster_pmap_portbybrick, NULL, 0, DRC_NA}, - [GF_PMAP_BRICKBYPORT] = {"BRICKBYPORT", GF_PMAP_BRICKBYPORT, - gluster_pmap_brickbyport, NULL, 0, DRC_NA}, - [GF_PMAP_SIGNIN] = {"SIGNIN", GF_PMAP_SIGNIN, gluster_pmap_signin, NULL, 0, - DRC_NA}, - [GF_PMAP_SIGNOUT] = {"SIGNOUT", GF_PMAP_SIGNOUT, gluster_pmap_signout, NULL, - 0, DRC_NA}, +static rpcsvc_actor_t gluster_pmap_actors[GF_PMAP_MAXVALUE] = { + [GF_PMAP_NULL] = {"NULL", NULL, NULL, GF_PMAP_NULL, DRC_NA, 0}, + [GF_PMAP_PORTBYBRICK] = {"PORTBYBRICK", gluster_pmap_portbybrick, NULL, + GF_PMAP_PORTBYBRICK, DRC_NA, 0}, + [GF_PMAP_BRICKBYPORT] = {"BRICKBYPORT", gluster_pmap_brickbyport, NULL, + GF_PMAP_BRICKBYPORT, DRC_NA, 0}, + [GF_PMAP_SIGNIN] = {"SIGNIN", gluster_pmap_signin, NULL, GF_PMAP_SIGNIN, + DRC_NA, 0}, + [GF_PMAP_SIGNOUT] = {"SIGNOUT", gluster_pmap_signout, NULL, GF_PMAP_SIGNOUT, + DRC_NA, 0}, }; struct rpcsvc_program gluster_pmap_prog = { diff --git a/xlators/nfs/server/src/acl3.c b/xlators/nfs/server/src/acl3.c index 2ede24b7bf5..50cd82dd422 100644 --- a/xlators/nfs/server/src/acl3.c +++ b/xlators/nfs/server/src/acl3.c @@ -701,13 +701,13 @@ rpcerr: return ret; } -rpcsvc_actor_t acl3svc_actors[ACL3_PROC_COUNT] = { - {"NULL", ACL3_NULL, acl3svc_null, NULL, 0, DRC_NA}, - {"GETACL", ACL3_GETACL, acl3svc_getacl, NULL, 0, DRC_NA}, - {"SETACL", ACL3_SETACL, acl3svc_setacl, NULL, 0, DRC_NA}, +static rpcsvc_actor_t acl3svc_actors[ACL3_PROC_COUNT] = { + {"NULL", acl3svc_null, NULL, ACL3_NULL, DRC_NA, 0}, + {"GETACL", acl3svc_getacl, NULL, ACL3_GETACL, DRC_NA, 0}, + {"SETACL", acl3svc_setacl, NULL, ACL3_SETACL, DRC_NA, 0}, }; -rpcsvc_program_t acl3prog = { +static rpcsvc_program_t acl3prog = { .progname = "ACL3", .prognum = ACL_PROGRAM, .progver = ACLV3_VERSION, diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c index 3b16bb82c74..88d3002a752 100644 --- a/xlators/nfs/server/src/mount3.c +++ b/xlators/nfs/server/src/mount3.c @@ -3656,20 +3656,26 @@ out: return ret; } -rpcsvc_actor_t mnt3svc_actors[MOUNT3_PROC_COUNT] = { - {"NULL", MOUNT3_NULL, mnt3svc_null, NULL, 0, DRC_NA}, - {"MNT", MOUNT3_MNT, mnt3svc_mnt, NULL, 0, DRC_NA}, - {"DUMP", MOUNT3_DUMP, mnt3svc_dump, NULL, 0, DRC_NA}, - {"UMNT", MOUNT3_UMNT, mnt3svc_umnt, NULL, 0, DRC_NA}, - {"UMNTALL", MOUNT3_UMNTALL, mnt3svc_umntall, NULL, 0, DRC_NA}, - {"EXPORT", MOUNT3_EXPORT, mnt3svc_export, NULL, 0, DRC_NA}}; +static rpcsvc_actor_t mnt3svc_actors[MOUNT3_PROC_COUNT] = { + { + "NULL", + mnt3svc_null, + NULL, + MOUNT3_NULL, + DRC_NA, + }, + {"MNT", mnt3svc_mnt, NULL, MOUNT3_MNT, DRC_NA, 0}, + {"DUMP", mnt3svc_dump, NULL, MOUNT3_DUMP, DRC_NA, 0}, + {"UMNT", mnt3svc_umnt, NULL, MOUNT3_UMNT, DRC_NA, 0}, + {"UMNTALL", mnt3svc_umntall, NULL, MOUNT3_UMNTALL, DRC_NA, 0}, + {"EXPORT", mnt3svc_export, NULL, MOUNT3_EXPORT, DRC_NA, 0}}; /* Static init parts are assigned here, dynamic ones are done in * mnt3svc_init and mnt3_init_state. * Making MOUNT3 a synctask so that the blocking DNS calls during rpc auth * gets offloaded to syncenv, keeping the main/poll thread unblocked */ -rpcsvc_program_t mnt3prog = { +static rpcsvc_program_t mnt3prog = { .progname = "MOUNT3", .prognum = MOUNT_PROGRAM, .progver = MOUNT_V3, @@ -4112,15 +4118,15 @@ err: return NULL; } -rpcsvc_actor_t mnt1svc_actors[MOUNT1_PROC_COUNT] = { - {"NULL", MOUNT1_NULL, mnt3svc_null, NULL, 0, DRC_NA}, - {"MNT", MOUNT1_MNT, NULL, NULL, 0, DRC_NA}, - {"DUMP", MOUNT1_DUMP, mnt3svc_dump, NULL, 0, DRC_NA}, - {"UMNT", MOUNT1_UMNT, mnt3svc_umnt, NULL, 0, DRC_NA}, - {"UMNTALL", MOUNT1_UMNTALL, NULL, NULL, 0, DRC_NA}, - {"EXPORT", MOUNT1_EXPORT, mnt3svc_export, NULL, 0, DRC_NA}}; +static rpcsvc_actor_t mnt1svc_actors[MOUNT1_PROC_COUNT] = { + {"NULL", mnt3svc_null, NULL, MOUNT1_NULL, DRC_NA, 0}, + {"MNT", NULL, NULL, MOUNT1_MNT, DRC_NA, 0}, + {"DUMP", mnt3svc_dump, NULL, MOUNT1_DUMP, DRC_NA, 0}, + {"UMNT", mnt3svc_umnt, NULL, MOUNT1_UMNT, DRC_NA, 0}, + {"UMNTALL", NULL, NULL, MOUNT1_UMNTALL, DRC_NA, 0}, + {"EXPORT", mnt3svc_export, NULL, MOUNT1_EXPORT, DRC_NA, 0}}; -rpcsvc_program_t mnt1prog = { +static rpcsvc_program_t mnt1prog = { .progname = "MOUNT1", .prognum = MOUNT_PROGRAM, .progver = MOUNT_V1, diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c index e2dd5f4bfe8..7cfd75f9ed1 100644 --- a/xlators/nfs/server/src/nfs3.c +++ b/xlators/nfs/server/src/nfs3.c @@ -5192,32 +5192,32 @@ rpcerr: return ret; } -rpcsvc_actor_t nfs3svc_actors[NFS3_PROC_COUNT] = { - {"NULL", NFS3_NULL, nfs3svc_null, NULL, 0, DRC_IDEMPOTENT}, - {"GETATTR", NFS3_GETATTR, nfs3svc_getattr, NULL, 0, DRC_IDEMPOTENT}, - {"SETATTR", NFS3_SETATTR, nfs3svc_setattr, NULL, 0, DRC_NON_IDEMPOTENT}, - {"LOOKUP", NFS3_LOOKUP, nfs3svc_lookup, NULL, 0, DRC_IDEMPOTENT}, - {"ACCESS", NFS3_ACCESS, nfs3svc_access, NULL, 0, DRC_IDEMPOTENT}, - {"READLINK", NFS3_READLINK, nfs3svc_readlink, NULL, 0, DRC_IDEMPOTENT}, - {"READ", NFS3_READ, nfs3svc_read, NULL, 0, DRC_IDEMPOTENT}, - {"WRITE", NFS3_WRITE, nfs3svc_write, nfs3svc_write_vecsizer, 0, - DRC_NON_IDEMPOTENT}, - {"CREATE", NFS3_CREATE, nfs3svc_create, NULL, 0, DRC_NON_IDEMPOTENT}, - {"MKDIR", NFS3_MKDIR, nfs3svc_mkdir, NULL, 0, DRC_NON_IDEMPOTENT}, - {"SYMLINK", NFS3_SYMLINK, nfs3svc_symlink, NULL, 0, DRC_NON_IDEMPOTENT}, - {"MKNOD", NFS3_MKNOD, nfs3svc_mknod, NULL, 0, DRC_NON_IDEMPOTENT}, - {"REMOVE", NFS3_REMOVE, nfs3svc_remove, NULL, 0, DRC_NON_IDEMPOTENT}, - {"RMDIR", NFS3_RMDIR, nfs3svc_rmdir, NULL, 0, DRC_NON_IDEMPOTENT}, - {"RENAME", NFS3_RENAME, nfs3svc_rename, NULL, 0, DRC_NON_IDEMPOTENT}, - {"LINK", NFS3_LINK, nfs3svc_link, NULL, 0, DRC_NON_IDEMPOTENT}, - {"READDIR", NFS3_READDIR, nfs3svc_readdir, NULL, 0, DRC_IDEMPOTENT}, - {"READDIRPLUS", NFS3_READDIRP, nfs3svc_readdirp, NULL, 0, DRC_IDEMPOTENT}, - {"FSSTAT", NFS3_FSSTAT, nfs3svc_fsstat, NULL, 0, DRC_IDEMPOTENT}, - {"FSINFO", NFS3_FSINFO, nfs3svc_fsinfo, NULL, 0, DRC_IDEMPOTENT}, - {"PATHCONF", NFS3_PATHCONF, nfs3svc_pathconf, NULL, 0, DRC_IDEMPOTENT}, - {"COMMIT", NFS3_COMMIT, nfs3svc_commit, NULL, 0, DRC_IDEMPOTENT}}; - -rpcsvc_program_t nfs3prog = { +static rpcsvc_actor_t nfs3svc_actors[NFS3_PROC_COUNT] = { + {"NULL", nfs3svc_null, NULL, NFS3_NULL, DRC_IDEMPOTENT, 0}, + {"GETATTR", nfs3svc_getattr, NULL, NFS3_GETATTR, DRC_IDEMPOTENT, 0}, + {"SETATTR", nfs3svc_setattr, NULL, NFS3_SETATTR, DRC_NON_IDEMPOTENT, 0}, + {"LOOKUP", nfs3svc_lookup, NULL, NFS3_LOOKUP, DRC_IDEMPOTENT, 0}, + {"ACCESS", nfs3svc_access, NULL, NFS3_ACCESS, DRC_IDEMPOTENT, 0}, + {"READLINK", nfs3svc_readlink, NULL, NFS3_READLINK, DRC_IDEMPOTENT, 0}, + {"READ", nfs3svc_read, NULL, NFS3_READ, DRC_IDEMPOTENT, 0}, + {"WRITE", nfs3svc_write, nfs3svc_write_vecsizer, NFS3_WRITE, DRC_IDEMPOTENT, + 0}, + {"CREATE", nfs3svc_create, NULL, NFS3_CREATE, DRC_NON_IDEMPOTENT, 0}, + {"MKDIR", nfs3svc_mkdir, NULL, NFS3_MKDIR, DRC_NON_IDEMPOTENT, 0}, + {"SYMLINK", nfs3svc_symlink, NULL, NFS3_SYMLINK, DRC_NON_IDEMPOTENT, 0}, + {"MKNOD", nfs3svc_mknod, NULL, NFS3_MKNOD, DRC_NON_IDEMPOTENT, 0}, + {"REMOVE", nfs3svc_remove, NULL, NFS3_REMOVE, DRC_NON_IDEMPOTENT, 0}, + {"RMDIR", nfs3svc_rmdir, NULL, NFS3_RMDIR, DRC_NON_IDEMPOTENT, 0}, + {"RENAME", nfs3svc_rename, NULL, NFS3_RENAME, DRC_NON_IDEMPOTENT, 0}, + {"LINK", nfs3svc_link, NULL, NFS3_LINK, DRC_NON_IDEMPOTENT, 0}, + {"READDIR", nfs3svc_readdir, NULL, NFS3_READDIR, DRC_IDEMPOTENT, 0}, + {"READDIRPLUS", nfs3svc_readdirp, NULL, NFS3_READDIRP, DRC_IDEMPOTENT, 0}, + {"FSSTAT", nfs3svc_fsstat, NULL, NFS3_FSSTAT, DRC_IDEMPOTENT, 0}, + {"FSINFO", nfs3svc_fsinfo, NULL, NFS3_FSINFO, DRC_IDEMPOTENT, 0}, + {"PATHCONF", nfs3svc_pathconf, NULL, NFS3_PATHCONF, DRC_IDEMPOTENT, 0}, + {"COMMIT", nfs3svc_commit, NULL, NFS3_COMMIT, DRC_IDEMPOTENT, 0}}; + +static rpcsvc_program_t nfs3prog = { .progname = "NFS3", .prognum = NFS_PROGRAM, .progver = NFS_V3, diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index 957f424fd42..ef65d7f55f8 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -2505,39 +2505,39 @@ out: return ret; } -rpcsvc_actor_t nlm4svc_actors[NLM4_PROC_COUNT] = { +static rpcsvc_actor_t nlm4svc_actors[NLM4_PROC_COUNT] = { /* 0 */ - {"NULL", NLM4_NULL, nlm4svc_null, NULL, 0, DRC_IDEMPOTENT}, - {"TEST", NLM4_TEST, nlm4svc_test, NULL, 0, DRC_IDEMPOTENT}, - {"LOCK", NLM4_LOCK, nlm4svc_lock, NULL, 0, DRC_NON_IDEMPOTENT}, - {"CANCEL", NLM4_CANCEL, nlm4svc_cancel, NULL, 0, DRC_NON_IDEMPOTENT}, - {"UNLOCK", NLM4_UNLOCK, nlm4svc_unlock, NULL, 0, DRC_NON_IDEMPOTENT}, + {"NULL", nlm4svc_null, NULL, NLM4_NULL, DRC_IDEMPOTENT, 0}, + {"TEST", nlm4svc_test, NULL, NLM4_TEST, DRC_IDEMPOTENT, 0}, + {"LOCK", nlm4svc_lock, NULL, NLM4_LOCK, DRC_IDEMPOTENT, 0}, + {"CANCEL", nlm4svc_cancel, NULL, NLM4_CANCEL, DRC_NON_IDEMPOTENT, 0}, + {"UNLOCK", nlm4svc_unlock, NULL, NLM4_UNLOCK, DRC_NON_IDEMPOTENT, 0}, /* 5 */ - {"GRANTED", NLM4_GRANTED, NULL, NULL, 0, DRC_NA}, - {"TEST", NLM4_TEST_MSG, NULL, NULL, 0, DRC_NA}, - {"LOCK", NLM4_LOCK_MSG, NULL, NULL, 0, DRC_NA}, - {"CANCEL", NLM4_CANCEL_MSG, NULL, NULL, 0, DRC_NA}, - {"UNLOCK", NLM4_UNLOCK_MSG, NULL, NULL, 0, DRC_NA}, + {"GRANTED", NULL, NULL, NLM4_GRANTED, DRC_NA, 0}, + {"TEST", NULL, NULL, NLM4_TEST_MSG, DRC_NA, 0}, + {"LOCK", NULL, NULL, NLM4_LOCK_MSG, DRC_NA, 0}, + {"CANCEL", NULL, NULL, NLM4_CANCEL_MSG, DRC_NA, 0}, + {"UNLOCK", NULL, NULL, NLM4_UNLOCK_MSG, DRC_NA, 0}, /* 10 */ - {"GRANTED", NLM4_GRANTED_MSG, NULL, NULL, 0, DRC_NA}, - {"TEST", NLM4_TEST_RES, NULL, NULL, 0, DRC_NA}, - {"LOCK", NLM4_LOCK_RES, NULL, NULL, 0, DRC_NA}, - {"CANCEL", NLM4_CANCEL_RES, NULL, NULL, 0, DRC_NA}, - {"UNLOCK", NLM4_UNLOCK_RES, NULL, NULL, 0, DRC_NA}, + {"GRANTED", NULL, NULL, NLM4_GRANTED_MSG, DRC_NA, 0}, + {"TEST", NULL, NULL, NLM4_TEST_RES, DRC_NA, 0}, + {"LOCK", NULL, NULL, NLM4_LOCK_RES, DRC_NA, 0}, + {"CANCEL", NULL, NULL, NLM4_CANCEL_RES, DRC_NA, 0}, + {"UNLOCK", NULL, NULL, NLM4_UNLOCK_RES, DRC_NA, 0}, /* 15 ; procedures 17,18,19 are not defined by nlm */ - {"GRANTED", NLM4_GRANTED_RES, NULL, NULL, 0, DRC_NA}, - {"SM_NOTIFY", NLM4_SM_NOTIFY, NULL, NULL, 0, DRC_NA}, - {"SEVENTEEN", NLM4_SEVENTEEN, NULL, NULL, 0, DRC_NA}, - {"EIGHTEEN", NLM4_EIGHTEEN, NULL, NULL, 0, DRC_NA}, - {"NINETEEN", NLM4_NINETEEN, NULL, NULL, 0, DRC_NA}, + {"GRANTED", NULL, NULL, NLM4_GRANTED_RES, DRC_NA, 0}, + {"SM_NOTIFY", NULL, NULL, NLM4_SM_NOTIFY, DRC_NA, 0}, + {"SEVENTEEN", NULL, NULL, NLM4_SEVENTEEN, DRC_NA, 0}, + {"EIGHTEEN", NULL, NULL, NLM4_EIGHTEEN, DRC_NA, 0}, + {"NINETEEN", NULL, NULL, NLM4_NINETEEN, DRC_NA, 0}, /* 20 */ - {"SHARE", NLM4_SHARE, nlm4svc_share, NULL, 0, DRC_NON_IDEMPOTENT}, - {"UNSHARE", NLM4_UNSHARE, nlm4svc_unshare, NULL, 0, DRC_NON_IDEMPOTENT}, - {"NM_LOCK", NLM4_NM_LOCK, nlm4svc_nm_lock, NULL, 0, DRC_NON_IDEMPOTENT}, - {"FREE_ALL", NLM4_FREE_ALL, nlm4svc_free_all, NULL, 0, DRC_IDEMPOTENT}, + {"SHARE", nlm4svc_share, NULL, NLM4_SHARE, DRC_NON_IDEMPOTENT, 0}, + {"UNSHARE", nlm4svc_unshare, NULL, NLM4_UNSHARE, DRC_NON_IDEMPOTENT, 0}, + {"NM_LOCK", nlm4svc_nm_lock, NULL, NLM4_NM_LOCK, DRC_NON_IDEMPOTENT, 0}, + {"FREE_ALL", nlm4svc_free_all, NULL, NLM4_FREE_ALL, DRC_IDEMPOTENT, 0}, }; -rpcsvc_program_t nlm4prog = { +static rpcsvc_program_t nlm4prog = { .progname = "NLM4", .prognum = NLM_PROGRAM, .progver = NLM_V4, diff --git a/xlators/protocol/client/src/client-callback.c b/xlators/protocol/client/src/client-callback.c index 36b69d2f51a..a5cc3d5cd35 100644 --- a/xlators/protocol/client/src/client-callback.c +++ b/xlators/protocol/client/src/client-callback.c @@ -286,24 +286,24 @@ out: return ret; } -rpcclnt_cb_actor_t gluster_cbk_actors[GF_CBK_MAXVALUE] = { - [GF_CBK_NULL] = {"NULL", GF_CBK_NULL, client_cbk_null}, - [GF_CBK_FETCHSPEC] = {"FETCHSPEC", GF_CBK_FETCHSPEC, client_cbk_fetchspec}, - [GF_CBK_INO_FLUSH] = {"INO_FLUSH", GF_CBK_INO_FLUSH, client_cbk_ino_flush}, +static rpcclnt_cb_actor_t gluster_cbk_actors[GF_CBK_MAXVALUE] = { + [GF_CBK_NULL] = {"NULL", client_cbk_null, GF_CBK_NULL}, + [GF_CBK_FETCHSPEC] = {"FETCHSPEC", client_cbk_fetchspec, GF_CBK_FETCHSPEC}, + [GF_CBK_INO_FLUSH] = {"INO_FLUSH", client_cbk_ino_flush, GF_CBK_INO_FLUSH}, [GF_CBK_CACHE_INVALIDATION] = {"CACHE_INVALIDATION", - GF_CBK_CACHE_INVALIDATION, - client_cbk_cache_invalidation}, - [GF_CBK_CHILD_UP] = {"CHILD_UP", GF_CBK_CHILD_UP, client_cbk_child_up}, - [GF_CBK_CHILD_DOWN] = {"CHILD_DOWN", GF_CBK_CHILD_DOWN, - client_cbk_child_down}, - [GF_CBK_RECALL_LEASE] = {"RECALL_LEASE", GF_CBK_RECALL_LEASE, - client_cbk_recall_lease}, + client_cbk_cache_invalidation, + GF_CBK_CACHE_INVALIDATION}, + [GF_CBK_CHILD_UP] = {"CHILD_UP", client_cbk_child_up, GF_CBK_CHILD_UP}, + [GF_CBK_CHILD_DOWN] = {"CHILD_DOWN", client_cbk_child_down, + GF_CBK_CHILD_DOWN}, + [GF_CBK_RECALL_LEASE] = {"RECALL_LEASE", client_cbk_recall_lease, + GF_CBK_RECALL_LEASE}, [GF_CBK_INODELK_CONTENTION] = {"INODELK_CONTENTION", - GF_CBK_INODELK_CONTENTION, - client_cbk_inodelk_contention}, + client_cbk_inodelk_contention, + GF_CBK_INODELK_CONTENTION}, [GF_CBK_ENTRYLK_CONTENTION] = {"ENTRYLK_CONTENTION", - GF_CBK_ENTRYLK_CONTENTION, - client_cbk_entrylk_contention}, + client_cbk_entrylk_contention, + GF_CBK_ENTRYLK_CONTENTION}, }; struct rpcclnt_cb_program gluster_cbk_prog = { diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 66286f40a6a..1f347db4f77 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -773,15 +773,15 @@ fail: return 0; } -rpcsvc_actor_t gluster_handshake_actors[GF_HNDSK_MAXVALUE] = { - [GF_HNDSK_NULL] = {"NULL", GF_HNDSK_NULL, server_null, NULL, 0, DRC_NA}, - [GF_HNDSK_SETVOLUME] = {"SETVOLUME", GF_HNDSK_SETVOLUME, server_setvolume, - NULL, 0, DRC_NA}, - [GF_HNDSK_GETSPEC] = {"GETSPEC", GF_HNDSK_GETSPEC, server_getspec, NULL, 0, - DRC_NA}, - [GF_HNDSK_PING] = {"PING", GF_HNDSK_PING, server_ping, NULL, 0, DRC_NA}, - [GF_HNDSK_SET_LK_VER] = {"SET_LK_VER", GF_HNDSK_SET_LK_VER, - server_set_lk_version, NULL, 0, DRC_NA}, +static rpcsvc_actor_t gluster_handshake_actors[GF_HNDSK_MAXVALUE] = { + [GF_HNDSK_NULL] = {"NULL", server_null, NULL, GF_HNDSK_NULL, DRC_NA, 0}, + [GF_HNDSK_SETVOLUME] = {"SETVOLUME", server_setvolume, NULL, + GF_HNDSK_SETVOLUME, DRC_NA, 0}, + [GF_HNDSK_GETSPEC] = {"GETSPEC", server_getspec, NULL, GF_HNDSK_GETSPEC, + DRC_NA, 0}, + [GF_HNDSK_PING] = {"PING", server_ping, NULL, GF_HNDSK_PING, DRC_NA, 0}, + [GF_HNDSK_SET_LK_VER] = {"SET_LK_VER", server_set_lk_version, NULL, + GF_HNDSK_SET_LK_VER, DRC_NA, 0}, }; struct rpcsvc_program gluster_handshake_prog = { diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 49bffb824e9..4d8b7be5a34 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -5967,105 +5967,111 @@ server3_3_compound(rpcsvc_request_t *req) return ret; } -rpcsvc_actor_t glusterfs3_3_fop_actors[GLUSTER_FOP_PROCCNT] = { - [GFS3_OP_NULL] = {"NULL", GFS3_OP_NULL, server_null, NULL, 0, DRC_NA}, - [GFS3_OP_STAT] = {"STAT", GFS3_OP_STAT, server3_3_stat, NULL, 0, DRC_NA}, - [GFS3_OP_READLINK] = {"READLINK", GFS3_OP_READLINK, server3_3_readlink, - NULL, 0, DRC_NA}, - [GFS3_OP_MKNOD] = {"MKNOD", GFS3_OP_MKNOD, server3_3_mknod, NULL, 0, - DRC_NA}, - [GFS3_OP_MKDIR] = {"MKDIR", GFS3_OP_MKDIR, server3_3_mkdir, NULL, 0, - DRC_NA}, - [GFS3_OP_UNLINK] = {"UNLINK", GFS3_OP_UNLINK, server3_3_unlink, NULL, 0, - DRC_NA}, - [GFS3_OP_RMDIR] = {"RMDIR", GFS3_OP_RMDIR, server3_3_rmdir, NULL, 0, - DRC_NA}, - [GFS3_OP_SYMLINK] = {"SYMLINK", GFS3_OP_SYMLINK, server3_3_symlink, NULL, 0, - DRC_NA}, - [GFS3_OP_RENAME] = {"RENAME", GFS3_OP_RENAME, server3_3_rename, NULL, 0, - DRC_NA}, - [GFS3_OP_LINK] = {"LINK", GFS3_OP_LINK, server3_3_link, NULL, 0, DRC_NA}, - [GFS3_OP_TRUNCATE] = {"TRUNCATE", GFS3_OP_TRUNCATE, server3_3_truncate, - NULL, 0, DRC_NA}, - [GFS3_OP_OPEN] = {"OPEN", GFS3_OP_OPEN, server3_3_open, NULL, 0, DRC_NA}, - [GFS3_OP_READ] = {"READ", GFS3_OP_READ, server3_3_readv, NULL, 0, DRC_NA}, - [GFS3_OP_WRITE] = {"WRITE", GFS3_OP_WRITE, server3_3_writev, - server3_3_writev_vecsizer, 0, DRC_NA}, - [GFS3_OP_STATFS] = {"STATFS", GFS3_OP_STATFS, server3_3_statfs, NULL, 0, - DRC_NA}, - [GFS3_OP_FLUSH] = {"FLUSH", GFS3_OP_FLUSH, server3_3_flush, NULL, 0, - DRC_NA}, - [GFS3_OP_FSYNC] = {"FSYNC", GFS3_OP_FSYNC, server3_3_fsync, NULL, 0, - DRC_NA}, - [GFS3_OP_SETXATTR] = {"SETXATTR", GFS3_OP_SETXATTR, server3_3_setxattr, - NULL, 0, DRC_NA}, - [GFS3_OP_GETXATTR] = {"GETXATTR", GFS3_OP_GETXATTR, server3_3_getxattr, - NULL, 0, DRC_NA}, - [GFS3_OP_REMOVEXATTR] = {"REMOVEXATTR", GFS3_OP_REMOVEXATTR, - server3_3_removexattr, NULL, 0, DRC_NA}, - [GFS3_OP_OPENDIR] = {"OPENDIR", GFS3_OP_OPENDIR, server3_3_opendir, NULL, 0, - DRC_NA}, - [GFS3_OP_FSYNCDIR] = {"FSYNCDIR", GFS3_OP_FSYNCDIR, server3_3_fsyncdir, - NULL, 0, DRC_NA}, - [GFS3_OP_ACCESS] = {"ACCESS", GFS3_OP_ACCESS, server3_3_access, NULL, 0, - DRC_NA}, - [GFS3_OP_CREATE] = {"CREATE", GFS3_OP_CREATE, server3_3_create, NULL, 0, - DRC_NA}, - [GFS3_OP_FTRUNCATE] = {"FTRUNCATE", GFS3_OP_FTRUNCATE, server3_3_ftruncate, - NULL, 0, DRC_NA}, - [GFS3_OP_FSTAT] = {"FSTAT", GFS3_OP_FSTAT, server3_3_fstat, NULL, 0, - DRC_NA}, - [GFS3_OP_LK] = {"LK", GFS3_OP_LK, server3_3_lk, NULL, 0, DRC_NA}, - [GFS3_OP_LOOKUP] = {"LOOKUP", GFS3_OP_LOOKUP, server3_3_lookup, NULL, 0, - DRC_NA}, - [GFS3_OP_READDIR] = {"READDIR", GFS3_OP_READDIR, server3_3_readdir, NULL, 0, - DRC_NA}, - [GFS3_OP_INODELK] = {"INODELK", GFS3_OP_INODELK, server3_3_inodelk, NULL, 0, - DRC_NA}, - [GFS3_OP_FINODELK] = {"FINODELK", GFS3_OP_FINODELK, server3_3_finodelk, - NULL, 0, DRC_NA}, - [GFS3_OP_ENTRYLK] = {"ENTRYLK", GFS3_OP_ENTRYLK, server3_3_entrylk, NULL, 0, - DRC_NA}, - [GFS3_OP_FENTRYLK] = {"FENTRYLK", GFS3_OP_FENTRYLK, server3_3_fentrylk, - NULL, 0, DRC_NA}, - [GFS3_OP_XATTROP] = {"XATTROP", GFS3_OP_XATTROP, server3_3_xattrop, NULL, 0, - DRC_NA}, - [GFS3_OP_FXATTROP] = {"FXATTROP", GFS3_OP_FXATTROP, server3_3_fxattrop, - NULL, 0, DRC_NA}, - [GFS3_OP_FGETXATTR] = {"FGETXATTR", GFS3_OP_FGETXATTR, server3_3_fgetxattr, - NULL, 0, DRC_NA}, - [GFS3_OP_FSETXATTR] = {"FSETXATTR", GFS3_OP_FSETXATTR, server3_3_fsetxattr, - NULL, 0, DRC_NA}, - [GFS3_OP_RCHECKSUM] = {"RCHECKSUM", GFS3_OP_RCHECKSUM, server3_3_rchecksum, - NULL, 0, DRC_NA}, - [GFS3_OP_SETATTR] = {"SETATTR", GFS3_OP_SETATTR, server3_3_setattr, NULL, 0, - DRC_NA}, - [GFS3_OP_FSETATTR] = {"FSETATTR", GFS3_OP_FSETATTR, server3_3_fsetattr, - NULL, 0, DRC_NA}, - [GFS3_OP_READDIRP] = {"READDIRP", GFS3_OP_READDIRP, server3_3_readdirp, - NULL, 0, DRC_NA}, - [GFS3_OP_RELEASE] = {"RELEASE", GFS3_OP_RELEASE, server3_3_release, NULL, 0, - DRC_NA}, - [GFS3_OP_RELEASEDIR] = {"RELEASEDIR", GFS3_OP_RELEASEDIR, - server3_3_releasedir, NULL, 0, DRC_NA}, - [GFS3_OP_FREMOVEXATTR] = {"FREMOVEXATTR", GFS3_OP_FREMOVEXATTR, - server3_3_fremovexattr, NULL, 0, DRC_NA}, - [GFS3_OP_FALLOCATE] = {"FALLOCATE", GFS3_OP_FALLOCATE, server3_3_fallocate, - NULL, 0, DRC_NA}, - [GFS3_OP_DISCARD] = {"DISCARD", GFS3_OP_DISCARD, server3_3_discard, NULL, 0, - DRC_NA}, - [GFS3_OP_ZEROFILL] = {"ZEROFILL", GFS3_OP_ZEROFILL, server3_3_zerofill, - NULL, 0, DRC_NA}, - [GFS3_OP_IPC] = {"IPC", GFS3_OP_IPC, server3_3_ipc, NULL, 0, DRC_NA}, - [GFS3_OP_SEEK] = {"SEEK", GFS3_OP_SEEK, server3_3_seek, NULL, 0, DRC_NA}, - [GFS3_OP_LEASE] = {"LEASE", GFS3_OP_LEASE, server3_3_lease, NULL, 0, - DRC_NA}, - [GFS3_OP_GETACTIVELK] = {"GETACTIVELK", GFS3_OP_GETACTIVELK, - server3_3_getactivelk, NULL, 0, DRC_NA}, - [GFS3_OP_SETACTIVELK] = {"SETACTIVELK", GFS3_OP_SETACTIVELK, - server3_3_setactivelk, NULL, 0, DRC_NA}, - [GFS3_OP_COMPOUND] = {"COMPOUND", GFS3_OP_COMPOUND, server3_3_compound, - NULL, 0, DRC_NA}, +static rpcsvc_actor_t glusterfs3_3_fop_actors[GLUSTER_FOP_PROCCNT] = { + [GFS3_OP_NULL] = {"NULL", server_null, NULL, GFS3_OP_NULL, DRC_NA, 0}, + [GFS3_OP_STAT] = {"STAT", server3_3_stat, NULL, GFS3_OP_STAT, DRC_NA, 0}, + [GFS3_OP_READLINK] = {"READLINK", server3_3_readlink, NULL, + GFS3_OP_READLINK, DRC_NA, 0}, + [GFS3_OP_MKNOD] = {"MKNOD", server3_3_mknod, NULL, GFS3_OP_MKNOD, DRC_NA, + 0}, + [GFS3_OP_MKDIR] = {"MKDIR", server3_3_mkdir, NULL, GFS3_OP_MKDIR, DRC_NA, + 0}, + [GFS3_OP_UNLINK] = {"UNLINK", server3_3_unlink, NULL, GFS3_OP_UNLINK, + DRC_NA, 0}, + [GFS3_OP_RMDIR] = {"RMDIR", server3_3_rmdir, NULL, GFS3_OP_RMDIR, DRC_NA, + 0}, + [GFS3_OP_SYMLINK] = {"SYMLINK", server3_3_symlink, NULL, GFS3_OP_SYMLINK, + DRC_NA, 0}, + [GFS3_OP_RENAME] = {"RENAME", server3_3_rename, NULL, GFS3_OP_RENAME, + DRC_NA, 0}, + [GFS3_OP_LINK] = {"LINK", server3_3_link, NULL, GFS3_OP_LINK, DRC_NA, 0}, + [GFS3_OP_TRUNCATE] = {"TRUNCATE", server3_3_truncate, NULL, + GFS3_OP_TRUNCATE, DRC_NA, 0}, + [GFS3_OP_OPEN] = {"OPEN", server3_3_open, NULL, GFS3_OP_OPEN, DRC_NA, 0}, + [GFS3_OP_READ] = {"READ", server3_3_readv, NULL, GFS3_OP_READ, DRC_NA, 0}, + [GFS3_OP_WRITE] = {"WRITE", server3_3_writev, server3_3_writev_vecsizer, + GFS3_OP_WRITE, DRC_NA, 0}, + [GFS3_OP_STATFS] = {"STATFS", server3_3_statfs, NULL, GFS3_OP_STATFS, + DRC_NA, 0}, + [GFS3_OP_FLUSH] = {"FLUSH", server3_3_flush, NULL, GFS3_OP_FLUSH, DRC_NA, + 0}, + [GFS3_OP_FSYNC] = {"FSYNC", server3_3_fsync, NULL, GFS3_OP_FSYNC, DRC_NA, + 0}, + [GFS3_OP_SETXATTR] = {"SETXATTR", server3_3_setxattr, NULL, + GFS3_OP_SETXATTR, DRC_NA, 0}, + [GFS3_OP_GETXATTR] = {"GETXATTR", server3_3_getxattr, NULL, + GFS3_OP_GETXATTR, DRC_NA, 0}, + [GFS3_OP_REMOVEXATTR] = {"REMOVEXATTR", server3_3_removexattr, NULL, + GFS3_OP_REMOVEXATTR, DRC_NA, 0}, + [GFS3_OP_OPENDIR] = {"OPENDIR", server3_3_opendir, NULL, GFS3_OP_OPENDIR, + DRC_NA, 0}, + [GFS3_OP_FSYNCDIR] = {"FSYNCDIR", server3_3_fsyncdir, NULL, + GFS3_OP_FSYNCDIR, DRC_NA, 0}, + [GFS3_OP_ACCESS] = {"ACCESS", server3_3_access, NULL, DRC_NA, 0}, + [GFS3_OP_CREATE] = {"CREATE", server3_3_create, NULL, GFS3_OP_ACCESS, + DRC_NA, 0}, + [GFS3_OP_FTRUNCATE] = {"FTRUNCATE", server3_3_ftruncate, NULL, + GFS3_OP_FTRUNCATE, DRC_NA, 0}, + [GFS3_OP_FSTAT] = {"FSTAT", server3_3_fstat, NULL, GFS3_OP_FSTAT, DRC_NA, + 0}, + [GFS3_OP_LK] = {"LK", server3_3_lk, NULL, GFS3_OP_LK, DRC_NA, 0}, + [GFS3_OP_LOOKUP] = {"LOOKUP", server3_3_lookup, NULL, GFS3_OP_LOOKUP, + DRC_NA, 0}, + [GFS3_OP_READDIR] = {"READDIR", server3_3_readdir, NULL, GFS3_OP_READDIR, + DRC_NA, 0}, + [GFS3_OP_INODELK] = {"INODELK", server3_3_inodelk, NULL, GFS3_OP_INODELK, + DRC_NA, 0}, + [GFS3_OP_FINODELK] = {"FINODELK", server3_3_finodelk, NULL, + GFS3_OP_FINODELK, DRC_NA, 0}, + [GFS3_OP_ENTRYLK] = {"ENTRYLK", server3_3_entrylk, NULL, GFS3_OP_ENTRYLK, + DRC_NA, 0}, + [GFS3_OP_FENTRYLK] = {"FENTRYLK", server3_3_fentrylk, NULL, + GFS3_OP_FENTRYLK, DRC_NA, 0}, + [GFS3_OP_XATTROP] = {"XATTROP", server3_3_xattrop, NULL, GFS3_OP_XATTROP, + DRC_NA, 0}, + [GFS3_OP_FXATTROP] = {"FXATTROP", server3_3_fxattrop, NULL, + GFS3_OP_FXATTROP, DRC_NA, 0}, + [GFS3_OP_FGETXATTR] = {"FGETXATTR", server3_3_fgetxattr, NULL, + GFS3_OP_FGETXATTR, DRC_NA, 0}, + [GFS3_OP_FSETXATTR] = {"FSETXATTR", server3_3_fsetxattr, NULL, + GFS3_OP_FSETXATTR, DRC_NA, 0}, + [GFS3_OP_RCHECKSUM] = {"RCHECKSUM", server3_3_rchecksum, NULL, + GFS3_OP_RCHECKSUM, DRC_NA, 0}, + [GFS3_OP_SETATTR] = {"SETATTR", server3_3_setattr, NULL, GFS3_OP_SETATTR, + DRC_NA, 0}, + [GFS3_OP_FSETATTR] = {"FSETATTR", server3_3_fsetattr, NULL, + GFS3_OP_FSETATTR, DRC_NA, 0}, + [GFS3_OP_READDIRP] = {"READDIRP", server3_3_readdirp, NULL, + GFS3_OP_READDIRP, DRC_NA, 0}, + [GFS3_OP_RELEASE] = {"RELEASE", server3_3_release, NULL, GFS3_OP_RELEASE, + DRC_NA, 0}, + [GFS3_OP_RELEASEDIR] = + { + "RELEASEDIR", + server3_3_releasedir, + NULL, + GFS3_OP_RELEASEDIR, + DRC_NA, + 0, + }, + [GFS3_OP_FREMOVEXATTR] = {"FREMOVEXATTR", server3_3_fremovexattr, NULL, + GFS3_OP_FREMOVEXATTR, DRC_NA, 0}, + [GFS3_OP_FALLOCATE] = {"FALLOCATE", server3_3_fallocate, NULL, + GFS3_OP_FALLOCATE, DRC_NA, 0}, + [GFS3_OP_DISCARD] = {"DISCARD", server3_3_discard, NULL, GFS3_OP_DISCARD, + DRC_NA, 0}, + [GFS3_OP_ZEROFILL] = {"ZEROFILL", server3_3_zerofill, NULL, + GFS3_OP_ZEROFILL, DRC_NA, 0}, + [GFS3_OP_IPC] = {"IPC", server3_3_ipc, NULL, GFS3_OP_IPC, DRC_NA, 0}, + [GFS3_OP_SEEK] = {"SEEK", server3_3_seek, NULL, GFS3_OP_SEEK, DRC_NA, 0}, + [GFS3_OP_LEASE] = {"LEASE", server3_3_lease, NULL, GFS3_OP_LEASE, DRC_NA, + 0}, + [GFS3_OP_GETACTIVELK] = {"GETACTIVELK", server3_3_getactivelk, NULL, + GFS3_OP_GETACTIVELK, DRC_NA, 0}, + [GFS3_OP_SETACTIVELK] = {"SETACTIVELK", server3_3_setactivelk, NULL, + GFS3_OP_SETACTIVELK, DRC_NA, 0}, + [GFS3_OP_COMPOUND] = {"COMPOUND", server3_3_compound, NULL, + GFS3_OP_COMPOUND, DRC_NA, 0}, }; struct rpcsvc_program glusterfs3_3_fop_prog = { diff --git a/xlators/protocol/server/src/server-rpc-fops_v2.c b/xlators/protocol/server/src/server-rpc-fops_v2.c index fa5db087a08..ec0769873a9 100644 --- a/xlators/protocol/server/src/server-rpc-fops_v2.c +++ b/xlators/protocol/server/src/server-rpc-fops_v2.c @@ -6010,99 +6010,99 @@ out: return ret; } -rpcsvc_actor_t glusterfs4_0_fop_actors[] = { - [GFS3_OP_NULL] = {"NULL", GFS3_OP_NULL, server_null, NULL, 0}, - [GFS3_OP_STAT] = {"STAT", GFS3_OP_STAT, server4_0_stat, NULL, 0}, - [GFS3_OP_READLINK] = {"READLINK", GFS3_OP_READLINK, server4_0_readlink, - NULL, 0}, - [GFS3_OP_MKNOD] = {"MKNOD", GFS3_OP_MKNOD, server4_0_mknod, NULL, 0}, - [GFS3_OP_MKDIR] = {"MKDIR", GFS3_OP_MKDIR, server4_0_mkdir, NULL, 0}, - [GFS3_OP_UNLINK] = {"UNLINK", GFS3_OP_UNLINK, server4_0_unlink, NULL, 0}, - [GFS3_OP_RMDIR] = {"RMDIR", GFS3_OP_RMDIR, server4_0_rmdir, NULL, 0}, - [GFS3_OP_SYMLINK] = {"SYMLINK", GFS3_OP_SYMLINK, server4_0_symlink, NULL, +static rpcsvc_actor_t glusterfs4_0_fop_actors[] = { + [GFS3_OP_NULL] = {"NULL", server_null, NULL, GFS3_OP_NULL, 0}, + [GFS3_OP_STAT] = {"STAT", server4_0_stat, NULL, GFS3_OP_STAT, 0}, + [GFS3_OP_READLINK] = {"READLINK", server4_0_readlink, NULL, + GFS3_OP_READLINK, 0}, + [GFS3_OP_MKNOD] = {"MKNOD", server4_0_mknod, NULL, GFS3_OP_MKNOD, 0}, + [GFS3_OP_MKDIR] = {"MKDIR", server4_0_mkdir, NULL, GFS3_OP_MKDIR, 0}, + [GFS3_OP_UNLINK] = {"UNLINK", server4_0_unlink, NULL, GFS3_OP_UNLINK, 0}, + [GFS3_OP_RMDIR] = {"RMDIR", server4_0_rmdir, NULL, GFS3_OP_RMDIR, 0}, + [GFS3_OP_SYMLINK] = {"SYMLINK", server4_0_symlink, NULL, GFS3_OP_SYMLINK, 0}, - [GFS3_OP_RENAME] = {"RENAME", GFS3_OP_RENAME, server4_0_rename, NULL, 0}, - [GFS3_OP_LINK] = {"LINK", GFS3_OP_LINK, server4_0_link, NULL, 0}, - [GFS3_OP_TRUNCATE] = {"TRUNCATE", GFS3_OP_TRUNCATE, server4_0_truncate, - NULL, 0}, - [GFS3_OP_OPEN] = {"OPEN", GFS3_OP_OPEN, server4_0_open, NULL, 0}, - [GFS3_OP_READ] = {"READ", GFS3_OP_READ, server4_0_readv, NULL, 0}, - [GFS3_OP_WRITE] = {"WRITE", GFS3_OP_WRITE, server4_0_writev, - server4_0_writev_vecsizer, 0}, - [GFS3_OP_STATFS] = {"STATFS", GFS3_OP_STATFS, server4_0_statfs, NULL, 0}, - [GFS3_OP_FLUSH] = {"FLUSH", GFS3_OP_FLUSH, server4_0_flush, NULL, 0}, - [GFS3_OP_FSYNC] = {"FSYNC", GFS3_OP_FSYNC, server4_0_fsync, NULL, 0}, - [GFS3_OP_GETXATTR] = {"GETXATTR", GFS3_OP_GETXATTR, server4_0_getxattr, - NULL, 0}, - [GFS3_OP_SETXATTR] = {"SETXATTR", GFS3_OP_SETXATTR, server4_0_setxattr, - NULL, 0}, - [GFS3_OP_REMOVEXATTR] = {"REMOVEXATTR", GFS3_OP_REMOVEXATTR, - server4_0_removexattr, NULL, 0}, - [GFS3_OP_OPENDIR] = {"OPENDIR", GFS3_OP_OPENDIR, server4_0_opendir, NULL, + [GFS3_OP_RENAME] = {"RENAME", server4_0_rename, NULL, GFS3_OP_RENAME, 0}, + [GFS3_OP_LINK] = {"LINK", server4_0_link, NULL, GFS3_OP_LINK, 0}, + [GFS3_OP_TRUNCATE] = {"TRUNCATE", server4_0_truncate, NULL, + GFS3_OP_TRUNCATE, 0}, + [GFS3_OP_OPEN] = {"OPEN", server4_0_open, NULL, GFS3_OP_OPEN, 0}, + [GFS3_OP_READ] = {"READ", server4_0_readv, NULL, GFS3_OP_READ, 0}, + [GFS3_OP_WRITE] = {"WRITE", server4_0_writev, server4_0_writev_vecsizer, + GFS3_OP_WRITE, 0}, + [GFS3_OP_STATFS] = {"STATFS", server4_0_statfs, NULL, GFS3_OP_STATFS, 0}, + [GFS3_OP_FLUSH] = {"FLUSH", server4_0_flush, NULL, GFS3_OP_FLUSH, 0}, + [GFS3_OP_FSYNC] = {"FSYNC", server4_0_fsync, NULL, GFS3_OP_FSYNC, 0}, + [GFS3_OP_GETXATTR] = {"GETXATTR", server4_0_getxattr, NULL, + GFS3_OP_GETXATTR, 0}, + [GFS3_OP_SETXATTR] = {"SETXATTR", server4_0_setxattr, NULL, + GFS3_OP_SETXATTR, 0}, + [GFS3_OP_REMOVEXATTR] = {"REMOVEXATTR", server4_0_removexattr, NULL, + GFS3_OP_REMOVEXATTR, 0}, + [GFS3_OP_OPENDIR] = {"OPENDIR", server4_0_opendir, NULL, GFS3_OP_OPENDIR, 0}, - [GFS3_OP_FSYNCDIR] = {"FSYNCDIR", GFS3_OP_FSYNCDIR, server4_0_fsyncdir, - NULL, 0}, - [GFS3_OP_ACCESS] = {"ACCESS", GFS3_OP_ACCESS, server4_0_access, NULL, 0}, - [GFS3_OP_CREATE] = {"CREATE", GFS3_OP_CREATE, server4_0_create, NULL, 0}, - [GFS3_OP_FTRUNCATE] = {"FTRUNCATE", GFS3_OP_FTRUNCATE, server4_0_ftruncate, - NULL, 0}, - [GFS3_OP_FSTAT] = {"FSTAT", GFS3_OP_FSTAT, server4_0_fstat, NULL, 0}, - [GFS3_OP_LK] = {"LK", GFS3_OP_LK, server4_0_lk, NULL, 0}, - [GFS3_OP_LOOKUP] = {"LOOKUP", GFS3_OP_LOOKUP, server4_0_lookup, NULL, 0}, - [GFS3_OP_READDIR] = {"READDIR", GFS3_OP_READDIR, server4_0_readdir, NULL, + [GFS3_OP_FSYNCDIR] = {"FSYNCDIR", server4_0_fsyncdir, NULL, + GFS3_OP_FSYNCDIR, 0}, + [GFS3_OP_ACCESS] = {"ACCESS", server4_0_access, NULL, GFS3_OP_ACCESS, 0}, + [GFS3_OP_CREATE] = {"CREATE", server4_0_create, NULL, GFS3_OP_CREATE, 0}, + [GFS3_OP_FTRUNCATE] = {"FTRUNCATE", server4_0_ftruncate, NULL, + GFS3_OP_FTRUNCATE, 0}, + [GFS3_OP_FSTAT] = {"FSTAT", server4_0_fstat, NULL, GFS3_OP_FSTAT, 0}, + [GFS3_OP_LK] = {"LK", server4_0_lk, NULL, GFS3_OP_LK, 0}, + [GFS3_OP_LOOKUP] = {"LOOKUP", server4_0_lookup, NULL, GFS3_OP_LOOKUP, 0}, + [GFS3_OP_READDIR] = {"READDIR", server4_0_readdir, NULL, GFS3_OP_READDIR, 0}, - [GFS3_OP_INODELK] = {"INODELK", GFS3_OP_INODELK, server4_0_inodelk, NULL, + [GFS3_OP_INODELK] = {"INODELK", server4_0_inodelk, NULL, GFS3_OP_INODELK, 0}, - [GFS3_OP_FINODELK] = {"FINODELK", GFS3_OP_FINODELK, server4_0_finodelk, - NULL, 0}, - [GFS3_OP_ENTRYLK] = {"ENTRYLK", GFS3_OP_ENTRYLK, server4_0_entrylk, NULL, + [GFS3_OP_FINODELK] = {"FINODELK", server4_0_finodelk, NULL, + GFS3_OP_FINODELK, 0}, + [GFS3_OP_ENTRYLK] = {"ENTRYLK", server4_0_entrylk, NULL, GFS3_OP_ENTRYLK, 0}, - [GFS3_OP_FENTRYLK] = {"FENTRYLK", GFS3_OP_FENTRYLK, server4_0_fentrylk, - NULL, 0}, - [GFS3_OP_XATTROP] = {"XATTROP", GFS3_OP_XATTROP, server4_0_xattrop, NULL, + [GFS3_OP_FENTRYLK] = {"FENTRYLK", server4_0_fentrylk, NULL, + GFS3_OP_FENTRYLK, 0}, + [GFS3_OP_XATTROP] = {"XATTROP", server4_0_xattrop, NULL, GFS3_OP_XATTROP, 0}, - [GFS3_OP_FXATTROP] = {"FXATTROP", GFS3_OP_FXATTROP, server4_0_fxattrop, - NULL, 0}, - [GFS3_OP_FGETXATTR] = {"FGETXATTR", GFS3_OP_FGETXATTR, server4_0_fgetxattr, - NULL, 0}, - [GFS3_OP_FSETXATTR] = {"FSETXATTR", GFS3_OP_FSETXATTR, server4_0_fsetxattr, - NULL, 0}, - [GFS3_OP_RCHECKSUM] = {"RCHECKSUM", GFS3_OP_RCHECKSUM, server4_0_rchecksum, - NULL, 0}, - [GFS3_OP_SETATTR] = {"SETATTR", GFS3_OP_SETATTR, server4_0_setattr, NULL, + [GFS3_OP_FXATTROP] = {"FXATTROP", server4_0_fxattrop, NULL, + GFS3_OP_FXATTROP, 0}, + [GFS3_OP_FGETXATTR] = {"FGETXATTR", server4_0_fgetxattr, NULL, + GFS3_OP_FGETXATTR, 0}, + [GFS3_OP_FSETXATTR] = {"FSETXATTR", server4_0_fsetxattr, NULL, + GFS3_OP_FSETXATTR, 0}, + [GFS3_OP_RCHECKSUM] = {"RCHECKSUM", server4_0_rchecksum, NULL, + GFS3_OP_RCHECKSUM, 0}, + [GFS3_OP_SETATTR] = {"SETATTR", server4_0_setattr, NULL, GFS3_OP_SETATTR, 0}, - [GFS3_OP_FSETATTR] = {"FSETATTR", GFS3_OP_FSETATTR, server4_0_fsetattr, - NULL, 0}, - [GFS3_OP_READDIRP] = {"READDIRP", GFS3_OP_READDIRP, server4_0_readdirp, - NULL, 0}, - [GFS3_OP_RELEASE] = {"RELEASE", GFS3_OP_RELEASE, server4_0_release, NULL, + [GFS3_OP_FSETATTR] = {"FSETATTR", server4_0_fsetattr, NULL, + GFS3_OP_FSETATTR, 0}, + [GFS3_OP_READDIRP] = {"READDIRP", server4_0_readdirp, NULL, + GFS3_OP_READDIRP, 0}, + [GFS3_OP_RELEASE] = {"RELEASE", server4_0_release, NULL, GFS3_OP_RELEASE, 0}, - [GFS3_OP_RELEASEDIR] = {"RELEASEDIR", GFS3_OP_RELEASEDIR, - server4_0_releasedir, NULL, 0}, - [GFS3_OP_FREMOVEXATTR] = {"FREMOVEXATTR", GFS3_OP_FREMOVEXATTR, - server4_0_fremovexattr, NULL, 0}, - [GFS3_OP_FALLOCATE] = {"FALLOCATE", GFS3_OP_FALLOCATE, server4_0_fallocate, - NULL, 0, DRC_NA}, - [GFS3_OP_DISCARD] = {"DISCARD", GFS3_OP_DISCARD, server4_0_discard, NULL, 0, - DRC_NA}, - [GFS3_OP_ZEROFILL] = {"ZEROFILL", GFS3_OP_ZEROFILL, server4_0_zerofill, - NULL, 0, DRC_NA}, - [GFS3_OP_IPC] = {"IPC", GFS3_OP_IPC, server4_0_ipc, NULL, 0, DRC_NA}, - [GFS3_OP_SEEK] = {"SEEK", GFS3_OP_SEEK, server4_0_seek, NULL, 0, DRC_NA}, - [GFS3_OP_LEASE] = {"LEASE", GFS3_OP_LEASE, server4_0_lease, NULL, 0, - DRC_NA}, - [GFS3_OP_GETACTIVELK] = {"GETACTIVELK", GFS3_OP_GETACTIVELK, - server4_0_getactivelk, NULL, 0, DRC_NA}, - [GFS3_OP_SETACTIVELK] = {"SETACTIVELK", GFS3_OP_SETACTIVELK, - server4_0_setactivelk, NULL, 0, DRC_NA}, - [GFS3_OP_COMPOUND] = {"COMPOUND", GFS3_OP_COMPOUND, server4_0_compound, - NULL, 0, DRC_NA}, - [GFS3_OP_ICREATE] = {"ICREATE", GFS3_OP_ICREATE, server4_0_icreate, NULL, 0, - DRC_NA}, - [GFS3_OP_NAMELINK] = {"NAMELINK", GFS3_OP_NAMELINK, server4_0_namelink, - NULL, 0, DRC_NA}, - [GFS3_OP_COPY_FILE_RANGE] = {"COPY-FILE-RANGE", GFS3_OP_COPY_FILE_RANGE, - server4_0_copy_file_range, NULL, 0, DRC_NA}, + [GFS3_OP_RELEASEDIR] = {"RELEASEDIR", server4_0_releasedir, NULL, + GFS3_OP_RELEASEDIR, 0}, + [GFS3_OP_FREMOVEXATTR] = {"FREMOVEXATTR", server4_0_fremovexattr, NULL, + GFS3_OP_FREMOVEXATTR, 0}, + [GFS3_OP_FALLOCATE] = {"FALLOCATE", server4_0_fallocate, NULL, DRC_NA, + GFS3_OP_FALLOCATE, 0}, + [GFS3_OP_DISCARD] = {"DISCARD", server4_0_discard, NULL, DRC_NA, + GFS3_OP_DISCARD, 0}, + [GFS3_OP_ZEROFILL] = {"ZEROFILL", server4_0_zerofill, NULL, DRC_NA, + GFS3_OP_ZEROFILL, 0}, + [GFS3_OP_IPC] = {"IPC", server4_0_ipc, NULL, DRC_NA, GFS3_OP_IPC, 0}, + [GFS3_OP_SEEK] = {"SEEK", server4_0_seek, NULL, DRC_NA, GFS3_OP_SEEK, 0}, + [GFS3_OP_LEASE] = {"LEASE", server4_0_lease, NULL, DRC_NA, GFS3_OP_LEASE, + 0}, + [GFS3_OP_GETACTIVELK] = {"GETACTIVELK", server4_0_getactivelk, NULL, DRC_NA, + GFS3_OP_GETACTIVELK, 0}, + [GFS3_OP_SETACTIVELK] = {"SETACTIVELK", server4_0_setactivelk, NULL, DRC_NA, + GFS3_OP_SETACTIVELK, 0}, + [GFS3_OP_COMPOUND] = {"COMPOUND", server4_0_compound, NULL, DRC_NA, + GFS3_OP_COMPOUND, 0}, + [GFS3_OP_ICREATE] = {"ICREATE", server4_0_icreate, NULL, DRC_NA, + GFS3_OP_ICREATE, 0}, + [GFS3_OP_NAMELINK] = {"NAMELINK", server4_0_namelink, NULL, DRC_NA, + GFS3_OP_NAMELINK, 0}, + [GFS3_OP_COPY_FILE_RANGE] = {"COPY-FILE-RANGE", server4_0_copy_file_range, + NULL, DRC_NA, GFS3_OP_COPY_FILE_RANGE, 0}, }; struct rpcsvc_program glusterfs4_0_fop_prog = { |