diff options
author | Vijay Bellur <vbellur@redhat.com> | 2015-04-06 12:34:55 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-03 11:04:33 -0700 |
commit | ee4b5ce0ef140e2ee98e7f061450b18ff2b53367 (patch) | |
tree | e66f2d498e14b968e7be50ccad09cd08e80e874d /rpc/rpc-lib/src/rpcsvc-common.h | |
parent | 9330d740fdc99707d8d5ac61eee2935ce63d57e3 (diff) |
rpc: Introduce attribute throttle for rpcsvc_t
This attribute will be used to set/unset throttling for
a rpcsvc_t program subsequently.
Following APIs have been added to get/set throttle.
int
rpcsvc_set_throttle (rpcsvc_t svc, gf_boolean_t value);
gf_boolean_t
rpcsvc_get_throttle (rpcsvc_t svc);
Change-Id: Ica8a9166cef22eb92d81fe68e48d0a5e24a1ef95
BUG: 1216310
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/10267
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/10442
Tested-by: NetBSD Build System
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc-common.h')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc-common.h b/rpc/rpc-lib/src/rpcsvc-common.h index 3c16abeb77a..832645bd12a 100644 --- a/rpc/rpc-lib/src/rpcsvc-common.h +++ b/rpc/rpc-lib/src/rpcsvc-common.h @@ -77,6 +77,8 @@ typedef struct rpcsvc_state { /* per-client limit of outstanding rpc requests */ int outstanding_rpc_limit; gf_boolean_t addr_namelookup; + /* determine whether throttling is needed, by default OFF */ + gf_boolean_t throttle; } rpcsvc_t; /* DRC START */ |