diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-06-01 15:08:44 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-06-05 22:12:20 +0530 |
commit | 15d9ee36c71bfe3499d7f3baf3a483199211261f (patch) | |
tree | a085afa3fabe33aab37128a7f140f69032c4844f /utils/utils.h | |
parent | 3994aa8cf1bdcf3a07cddfefdb96cc2b94e01a97 (diff) |
daemon: make glfs lru cache capacity configurable
$ gluster-blockd --help
gluster-blockd (0.2)
usage:
gluster-blockd [--glfs-lru-count <count>]
commands:
--glfs-lru-count <count>
glfs objects cache capacity [max: 512] (default: 5)
--help
show this message and exit.
--version
show version info and exit.
Change-Id: I00a9277690a1c5ace51e223e9e4ed9ce61ae2428
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'utils/utils.h')
-rw-r--r-- | utils/utils.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/utils/utils.h b/utils/utils.h index c9f0baf..db24833 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -213,9 +213,8 @@ gbFree(1 ? (void *) &(ptr) : (ptr)) -typedef enum gbCmdlineOption { +typedef enum gbCliCmdlineOption { GB_CLI_UNKNOWN = 0, - GB_CLI_CREATE = 1, GB_CLI_LIST = 2, GB_CLI_INFO = 3, @@ -229,12 +228,10 @@ typedef enum gbCmdlineOption { GB_CLI_HYPHEN_USAGE = 11, GB_CLI_OPT_MAX -} gbCmdlineOption; - +} gbCliCmdlineOption; -static const char *const gbCmdlineOptLookup[] = { +static const char *const gbCliCmdlineOptLookup[] = { [GB_CLI_UNKNOWN] = "NONE", - [GB_CLI_CREATE] = "create", [GB_CLI_LIST] = "list", [GB_CLI_INFO] = "info", @@ -250,6 +247,25 @@ static const char *const gbCmdlineOptLookup[] = { [GB_CLI_OPT_MAX] = NULL, }; +typedef enum gbDaemonCmdlineOption { + GB_DAEMON_UNKNOWN = 0, + GB_DAEMON_HELP = 1, + GB_DAEMON_VERSION = 2, + GB_DAEMON_USAGE = 3, + GB_DAEMON_GLFS_LRU_COUNT = 4, + + GB_DAEMON_OPT_MAX +} gbDaemonCmdlineOption; + +static const char *const gbDaemonCmdlineOptLookup[] = { + [GB_DAEMON_UNKNOWN] = "NONE", + [GB_DAEMON_HELP] = "help", + [GB_DAEMON_VERSION] = "version", + [GB_DAEMON_USAGE] = "usage", + [GB_DAEMON_GLFS_LRU_COUNT] = "glfs-lru-count", + + [GB_DAEMON_OPT_MAX] = NULL, +}; typedef enum LogLevel { GB_LOG_NONE = 0, @@ -368,6 +384,8 @@ static const char *const RemoteCreateRespLookup[] = { int glusterBlockCLIOptEnumParse(const char *opt); +int glusterBlockDaemonOptEnumParse(const char *opt); + int blockMetaKeyEnumParse(const char *opt); int blockMetaStatusEnumParse(const char *opt); |