diff options
Diffstat (limited to 'rpc/xdr/src/cli1-xdr.h')
| -rw-r--r-- | rpc/xdr/src/cli1-xdr.h | 151 |
1 files changed, 74 insertions, 77 deletions
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h index d136ec255..5e8c29fbb 100644 --- a/rpc/xdr/src/cli1-xdr.h +++ b/rpc/xdr/src/cli1-xdr.h @@ -1,20 +1,11 @@ /* - Copyright (c) 2007-2011 Gluster, Inc. <http://www.gluster.com> + Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com> This file is part of GlusterFS. - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. */ #include "xdr-common.h" @@ -47,22 +38,20 @@ enum gf_cli_defrag_type { GF_DEFRAG_CMD_STOP = 1 + 1, GF_DEFRAG_CMD_STATUS = 1 + 2, GF_DEFRAG_CMD_START_LAYOUT_FIX = 1 + 3, - GF_DEFRAG_CMD_START_MIGRATE_DATA = 1 + 4, - GF_DEFRAG_CMD_START_MIGRATE_DATA_FORCE = 1 + 5, - GF_DEFRAG_CMD_START_FORCE = 1 + 6, + GF_DEFRAG_CMD_START_FORCE = 1 + 4, }; typedef enum gf_cli_defrag_type gf_cli_defrag_type; enum gf_defrag_status_t { GF_DEFRAG_STATUS_NOT_STARTED = 0, - GF_DEFRAG_STATUS_LAYOUT_FIX_STARTED = 1, - GF_DEFRAG_STATUS_MIGRATE_DATA_STARTED = 2, - GF_DEFRAG_STATUS_STOPPED = 3, - GF_DEFRAG_STATUS_COMPLETE = 4, - GF_DEFRAG_STATUS_FAILED = 5, - GF_DEFRAG_STATUS_LAYOUT_FIX_COMPLETE = 6, - GF_DEFRAG_STATUS_MIGRATE_DATA_COMPLETE = 7, - GF_DEFRAG_STATUS_PAUSED = 8, + GF_DEFRAG_STATUS_STARTED = 1, + GF_DEFRAG_STATUS_STOPPED = 2, + GF_DEFRAG_STATUS_COMPLETE = 3, + GF_DEFRAG_STATUS_FAILED = 4, + GF_DEFRAG_STATUS_LAYOUT_FIX_STARTED = 5, + GF_DEFRAG_STATUS_LAYOUT_FIX_STOPPED = 6, + GF_DEFRAG_STATUS_LAYOUT_FIX_COMPLETE = 7, + GF_DEFRAG_STATUS_LAYOUT_FIX_FAILED = 8, }; typedef enum gf_defrag_status_t gf_defrag_status_t; @@ -89,10 +78,9 @@ enum gf1_op_commands { GF_OP_CMD_NONE = 0, GF_OP_CMD_START = 0 + 1, GF_OP_CMD_COMMIT = 0 + 2, - GF_OP_CMD_PAUSE = 0 + 3, - GF_OP_CMD_ABORT = 0 + 4, - GF_OP_CMD_STATUS = 0 + 5, - GF_OP_CMD_COMMIT_FORCE = 0 + 6, + GF_OP_CMD_STOP = 0 + 3, + GF_OP_CMD_STATUS = 0 + 4, + GF_OP_CMD_COMMIT_FORCE = 0 + 5, }; typedef enum gf1_op_commands gf1_op_commands; @@ -108,7 +96,8 @@ enum gf_quota_type { typedef enum gf_quota_type gf_quota_type; enum gf1_cli_friends_list { - GF_CLI_LIST_ALL = 1, + GF_CLI_LIST_PEERS = 1, + GF_CLI_LIST_POOL_NODES = 2, }; typedef enum gf1_cli_friends_list gf1_cli_friends_list; @@ -136,6 +125,8 @@ enum gf1_cli_gsync_set { GF_GSYNC_OPTION_TYPE_CONFIG = 3, GF_GSYNC_OPTION_TYPE_STATUS = 4, GF_GSYNC_OPTION_TYPE_ROTATE = 5, + GF_GSYNC_OPTION_TYPE_CREATE = 6, + GF_GSYNC_OPTION_TYPE_DELETE = 7, }; typedef enum gf1_cli_gsync_set gf1_cli_gsync_set; @@ -161,20 +152,58 @@ enum gf1_cli_top_op { typedef enum gf1_cli_top_op gf1_cli_top_op; enum gf_cli_status_type { - GF_CLI_STATUS_NONE = 0x000, - GF_CLI_STATUS_MEM = 0x001, - GF_CLI_STATUS_CLIENTS = 0x002, - GF_CLI_STATUS_INODE = 0x004, - GF_CLI_STATUS_FD = 0x008, - GF_CLI_STATUS_CALLPOOL = 0x010, - GF_CLI_STATUS_DETAIL = 0x020, - GF_CLI_STATUS_MASK = 0x0FF, - GF_CLI_STATUS_VOL = 0x100, - GF_CLI_STATUS_ALL = 0x200, - GF_CLI_STATUS_BRICK = 0x400, + GF_CLI_STATUS_NONE = 0x0000, + GF_CLI_STATUS_MEM = 0x0001, + GF_CLI_STATUS_CLIENTS = 0x0002, + GF_CLI_STATUS_INODE = 0x0004, + GF_CLI_STATUS_FD = 0x0008, + GF_CLI_STATUS_CALLPOOL = 0x0010, + GF_CLI_STATUS_DETAIL = 0x0020, + GF_CLI_STATUS_TASKS = 0x0040, + GF_CLI_STATUS_MASK = 0x00FF, + GF_CLI_STATUS_VOL = 0x0100, + GF_CLI_STATUS_ALL = 0x0200, + GF_CLI_STATUS_BRICK = 0x0400, + GF_CLI_STATUS_NFS = 0x0800, + GF_CLI_STATUS_SHD = 0x1000, }; typedef enum gf_cli_status_type gf_cli_status_type; +enum gf1_cli_snapshot { + GF_SNAP_OPTION_TYPE_NONE = 0, + GF_SNAP_OPTION_TYPE_CREATE = 1, + GF_SNAP_OPTION_TYPE_DELETE = 2, + GF_SNAP_OPTION_TYPE_RESTORE = 3, + GF_SNAP_OPTION_TYPE_START = 4, + GF_SNAP_OPTION_TYPE_STOP = 5, + GF_SNAP_OPTION_TYPE_LIST = 6, + GF_SNAP_OPTION_TYPE_STATUS = 7, + GF_SNAP_OPTION_TYPE_CONFIG = 8, + GF_SNAP_OPTION_TYPE_INFO = 9, +}; +typedef enum gf1_cli_snapshot gf1_cli_snapshot; + +enum gf1_cli_snapshot_info { + GF_SNAP_INFO_TYPE_ALL = 0, + GF_SNAP_INFO_TYPE_SNAP = 1, + GF_SNAP_INFO_TYPE_VOL = 2, +}; +typedef enum gf1_cli_snapshot_info gf1_cli_snapshot_info; + +enum gf1_cli_snapshot_config { + GF_SNAP_CONFIG_TYPE_NONE = 0, + GF_SNAP_CONFIG_TYPE_SET = 1, + GF_SNAP_CONFIG_DISPLAY = 2, +}; +typedef enum gf1_cli_snapshot_config gf1_cli_snapshot_config; + +enum gf1_cli_snapshot_status { + GF_SNAP_STATUS_TYPE_ALL = 0, + GF_SNAP_STATUS_TYPE_SNAP = 1, + GF_SNAP_STATUS_TYPE_VOL = 2, +}; +typedef enum gf1_cli_snapshot_status gf1_cli_snapshot_status; + struct gf_cli_req { struct { u_int dict_len; @@ -194,34 +223,6 @@ struct gf_cli_rsp { }; typedef struct gf_cli_rsp gf_cli_rsp; -struct gf1_cli_probe_req { - char *hostname; - int port; -}; -typedef struct gf1_cli_probe_req gf1_cli_probe_req; - -struct gf1_cli_probe_rsp { - int op_ret; - int op_errno; - int port; - char *hostname; -}; -typedef struct gf1_cli_probe_rsp gf1_cli_probe_rsp; - -struct gf1_cli_deprobe_req { - char *hostname; - int port; - int flags; -}; -typedef struct gf1_cli_deprobe_req gf1_cli_deprobe_req; - -struct gf1_cli_deprobe_rsp { - int op_ret; - int op_errno; - char *hostname; -}; -typedef struct gf1_cli_deprobe_rsp gf1_cli_deprobe_rsp; - struct gf1_cli_peer_list_req { int flags; struct { @@ -314,12 +315,10 @@ extern bool_t xdr_gf1_cli_gsync_set (XDR *, gf1_cli_gsync_set*); extern bool_t xdr_gf1_cli_stats_op (XDR *, gf1_cli_stats_op*); extern bool_t xdr_gf1_cli_top_op (XDR *, gf1_cli_top_op*); extern bool_t xdr_gf_cli_status_type (XDR *, gf_cli_status_type*); +extern bool_t xdr_gf1_cli_snapshot (XDR *, gf1_cli_snapshot*); +extern bool_t xdr_gf1_cli_snapshot_config (XDR *, gf1_cli_snapshot_config*); extern bool_t xdr_gf_cli_req (XDR *, gf_cli_req*); extern bool_t xdr_gf_cli_rsp (XDR *, gf_cli_rsp*); -extern bool_t xdr_gf1_cli_probe_req (XDR *, gf1_cli_probe_req*); -extern bool_t xdr_gf1_cli_probe_rsp (XDR *, gf1_cli_probe_rsp*); -extern bool_t xdr_gf1_cli_deprobe_req (XDR *, gf1_cli_deprobe_req*); -extern bool_t xdr_gf1_cli_deprobe_rsp (XDR *, gf1_cli_deprobe_rsp*); extern bool_t xdr_gf1_cli_peer_list_req (XDR *, gf1_cli_peer_list_req*); extern bool_t xdr_gf1_cli_peer_list_rsp (XDR *, gf1_cli_peer_list_rsp*); extern bool_t xdr_gf1_cli_fsm_log_req (XDR *, gf1_cli_fsm_log_req*); @@ -346,12 +345,10 @@ extern bool_t xdr_gf1_cli_gsync_set (); extern bool_t xdr_gf1_cli_stats_op (); extern bool_t xdr_gf1_cli_top_op (); extern bool_t xdr_gf_cli_status_type (); +extern bool_t xdr_gf1_cli_snapshot (); +extern bool_t xdr_gf1_cli_snapshot_config (); extern bool_t xdr_gf_cli_req (); extern bool_t xdr_gf_cli_rsp (); -extern bool_t xdr_gf1_cli_probe_req (); -extern bool_t xdr_gf1_cli_probe_rsp (); -extern bool_t xdr_gf1_cli_deprobe_req (); -extern bool_t xdr_gf1_cli_deprobe_rsp (); extern bool_t xdr_gf1_cli_peer_list_req (); extern bool_t xdr_gf1_cli_peer_list_rsp (); extern bool_t xdr_gf1_cli_fsm_log_req (); |
