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)  

cli-cmd.h File Reference
#include <netdb.h>
#include "cli.h"
#include <glusterfs/list.h>
Include dependency graph for cli-cmd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cli_cmd
 
struct  cli_cmd_volume_get_ctx_
 
struct  cli_profile_info_
 

Macros

#define GLUSTER_SHARED_STORAGE   "gluster_shared_storage"
 
#define CLI_LOCAL_INIT(local, words, frame, dictionary)
 
#define CLI_STACK_DESTROY(_frame)
 

Typedefs

typedef struct cli_profile_info_ cli_profile_info_t
 
typedef struct cli_cmd_volume_get_ctx_ cli_cmd_volume_get_ctx_t
 

Enumerations

enum  gf_answer_t { GF_ANSWER_YES = 1, GF_ANSWER_NO = 2 }
 

Functions

int cli_cmd_volume_register (struct cli_state *state)
 
int cli_cmd_probe_register (struct cli_state *state)
 
int cli_cmd_system_register (struct cli_state *state)
 
int cli_cmd_snapshot_register (struct cli_state *state)
 
int cli_cmd_global_register (struct cli_state *state)
 
int cli_cmd_misc_register (struct cli_state *state)
 
struct cli_cmd_wordcli_cmd_nextword (struct cli_cmd_word *word, const char *text)
 
void cli_cmd_tokens_destroy (char **tokens)
 
int cli_cmd_await_response (unsigned time)
 
int cli_cmd_broadcast_response (int32_t status)
 
int cli_cmd_lock ()
 
int cli_cmd_unlock ()
 
int cli_cmd_submit (struct rpc_clnt *rpc, void *req, call_frame_t *frame, rpc_clnt_prog_t *prog, int procnum, struct iobref *iobref, xlator_t *this, fop_cbk_fn_t cbkfn, xdrproc_t xdrproc)
 
int cli_cmd_pattern_cmp (void *a, void *b)
 
void cli_cmd_sort (struct cli_cmd *cmd, int count)
 
gf_answer_t cli_cmd_get_confirmation (struct cli_state *state, const char *question)
 
int cli_cmd_sent_status_get (int *status)
 
bool _limits_set_on_volume (char *volname, int type)
 

Macro Definition Documentation

◆ CLI_LOCAL_INIT

#define CLI_LOCAL_INIT (   local,
  words,
  frame,
  dictionary 
)
Value:
do { \
local = cli_local_get(); \
\
if (local) { \
local->words = words; \
if (dictionary) \
local->dict = dictionary; \
if (frame) \
frame->local = local; \
} \
} while (0)

Definition at line 20 of file cli-cmd.h.

◆ CLI_STACK_DESTROY

#define CLI_STACK_DESTROY (   _frame)
Value:
do { \
if (_frame) { \
if (_frame->local) { \
gf_log("cli", GF_LOG_DEBUG, \
"frame->local " \
"is not NULL (%p)", \
_frame->local); \
cli_local_wipe(_frame->local); \
_frame->local = NULL; \
} \
STACK_DESTROY(_frame->root); \
} \
} while (0);

Definition at line 33 of file cli-cmd.h.

◆ GLUSTER_SHARED_STORAGE

#define GLUSTER_SHARED_STORAGE   "gluster_shared_storage"

Definition at line 18 of file cli-cmd.h.

Typedef Documentation

◆ cli_cmd_volume_get_ctx_t

Definition at line 1 of file cli-cmd.h.

◆ cli_profile_info_t

Enumeration Type Documentation

◆ gf_answer_t

Enumerator
GF_ANSWER_YES 
GF_ANSWER_NO 

Definition at line 48 of file cli-cmd.h.

Function Documentation

◆ _limits_set_on_volume()

◆ cli_cmd_await_response()

int cli_cmd_await_response ( unsigned  time)

Definition at line 262 of file cli-cmd.c.

References cli_op_ret, cli_out, cmd_done, cond, cond_mutex, and seconds_from_now().

Referenced by cli_cmd_submit().

◆ cli_cmd_broadcast_response()

◆ cli_cmd_get_confirmation()

◆ cli_cmd_global_register()

int cli_cmd_global_register ( struct cli_state state)

Definition at line 87 of file cli-cmd-global.c.

References cli_cmd_register(), global_cmds, out, and cli_cmd::pattern.

Referenced by cli_cmds_register().

◆ cli_cmd_lock()

int cli_cmd_lock ( )

Definition at line 235 of file cli-cmd.c.

References cond_mutex.

Referenced by cli_cmd_sent_status_get(), cli_cmd_status_reset(), and cli_cmd_submit().

◆ cli_cmd_misc_register()

int cli_cmd_misc_register ( struct cli_state state)

Definition at line 103 of file cli-cmd-misc.c.

References cli_cmd_register(), cli_help_cmds, cli_misc_cmds, out, and cli_cmd::pattern.

Referenced by cli_cmds_register().

◆ cli_cmd_nextword()

struct cli_cmd_word* cli_cmd_nextword ( struct cli_cmd_word word,
const char *  text 
)

Definition at line 276 of file registry.c.

References cli_getunamb(), cli_cmd_word::nextwords, and sel_cmd_word().

Referenced by cli_cmd_ingest(), and cli_cmd_process().

◆ cli_cmd_pattern_cmp()

int cli_cmd_pattern_cmp ( void *  a,
void *  b 
)

Definition at line 376 of file cli-cmd.c.

References cli_cmd::pattern.

Referenced by cli_cmd_sort().

◆ cli_cmd_probe_register()

int cli_cmd_probe_register ( struct cli_state state)

Definition at line 309 of file cli-cmd-peer.c.

References cli_cmd_register(), cli_probe_cmds, out, and cli_cmd::pattern.

Referenced by cli_cmds_register().

◆ cli_cmd_sent_status_get()

◆ cli_cmd_snapshot_register()

int cli_cmd_snapshot_register ( struct cli_state state)

Definition at line 125 of file cli-cmd-snapshot.c.

References cli_cmd_register(), out, cli_cmd::pattern, and snapshot_cmds.

Referenced by cli_cmds_register().

◆ cli_cmd_sort()

◆ cli_cmd_submit()

◆ cli_cmd_system_register()

int cli_cmd_system_register ( struct cli_state state)

Definition at line 616 of file cli-cmd-system.c.

References cli_cmd_register(), cli_system_cmds, out, and cli_cmd::pattern.

Referenced by cli_cmds_register().

◆ cli_cmd_tokens_destroy()

void cli_cmd_tokens_destroy ( char **  tokens)

Definition at line 148 of file registry.c.

Referenced by cli_cmd_process_line(), cli_cmd_register(), and cli_cmd_tokenize().

◆ cli_cmd_unlock()

int cli_cmd_unlock ( )

Definition at line 242 of file cli-cmd.c.

References cond_mutex.

Referenced by cli_cmd_sent_status_get(), cli_cmd_status_reset(), and cli_cmd_submit().

◆ cli_cmd_volume_register()

int cli_cmd_volume_register ( struct cli_state state)

Definition at line 3240 of file cli-cmd-volume.c.

References bitrot_cmds, cli_cmd_register(), out, cli_cmd::pattern, quota_cmds, and volume_cmds.

Referenced by cli_cmds_register().

cli_local_get
cli_local_t * cli_local_get()
Definition: cli.c:772
GF_LOG_DEBUG
@ GF_LOG_DEBUG
Definition: logging.h:77