summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/pump.h
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-08-12 04:49:15 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-12 03:29:54 -0700
commite0347526dd77f7171ae9da72fc92ca99a79dd282 (patch)
treef39e9f192564fdd9648257d6b7252ea38cecbe6e /xlators/cluster/afr/src/pump.h
parente98ebc1da4f49fba2bcaaf3212b00058e615cf29 (diff)
cluster/pump: Dynamically control sink connect and disconnect.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1303 (Cleanup replace-brick state info) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1303
Diffstat (limited to 'xlators/cluster/afr/src/pump.h')
-rw-r--r--xlators/cluster/afr/src/pump.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/xlators/cluster/afr/src/pump.h b/xlators/cluster/afr/src/pump.h
index 15799002b18..e786fb0ded0 100644
--- a/xlators/cluster/afr/src/pump.h
+++ b/xlators/cluster/afr/src/pump.h
@@ -22,6 +22,10 @@
#include "syncop.h"
+/* FIXME: Needs to be defined in a common file */
+#define CLIENT_CMD_CONNECT "trusted.glusterfs.client-connect"
+#define CLIENT_CMD_DISCONNECT "trusted.glusterfs.client-disconnect"
+
#define PUMP_PID 696969
#define PUMP_LK_OWNER 696969
@@ -43,23 +47,23 @@
#define PUMP_SINK_CHILD(xl) (xl->children->next->xlator)
typedef enum {
- PUMP_STATE_RUNNING,
- PUMP_STATE_RESUME,
- PUMP_STATE_PAUSE,
- PUMP_STATE_ABORT,
+ PUMP_STATE_RUNNING, /* Pump is running and migrating files */
+ PUMP_STATE_RESUME, /* Pump is resuming from a previous pause */
+ PUMP_STATE_PAUSE, /* Pump is paused */
+ PUMP_STATE_ABORT, /* Pump is aborted */
} pump_state_t;
typedef struct _pump_private {
- struct syncenv *env;
- const char *resume_path;
- gf_lock_t resume_path_lock;
- gf_lock_t pump_state_lock;
- pump_state_t pump_state;
- long source_blocks;
- long sink_blocks;
- char current_file[PATH_MAX];
- uint64_t number_files_pumped;
- gf_boolean_t pump_finished;
+ struct syncenv *env; /* The env pointer to the pump synctask */
+ const char *resume_path; /* path to resume from the last pause */
+ gf_lock_t resume_path_lock; /* Synchronize resume_path changes */
+ gf_lock_t pump_state_lock; /* Synchronize pump_state changes */
+ pump_state_t pump_state; /* State of pump */
+ char current_file[PATH_MAX]; /* Current file being pumped */
+ uint64_t number_files_pumped; /* Number of files pumped */
+ gf_boolean_t pump_finished; /* Boolean to indicate pump termination */
+ char pump_start_pending; /* Boolean to mark start pending until
+ CHILD_UP */
} pump_private_t;
void