summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/pump.h
diff options
context:
space:
mode:
authorKrishnan P <kp@gluster.com>2011-06-16 01:28:28 +0000
committerAnand Avati <avati@gluster.com>2011-06-16 09:15:16 -0700
commit1d4378e0e78309682c13d0fc0c97c3c3bb6674b7 (patch)
tree741e3da57f0cebcc00b54c9cd097662e2bafd669 /xlators/cluster/afr/src/pump.h
parent4e6f6408b0e177dcdc0b19561bbaab6b7e26c23a (diff)
pump: cleanup xattrs on both commit and abort path.
This change makes glusterd to send a setxattr command for replace-brick commit operation similar to abort. Earlier we could commit even before the 'migration' of data was complete, with this change we fail that operation. Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3033 (Changes to replace-brick and syntask interface.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3033
Diffstat (limited to 'xlators/cluster/afr/src/pump.h')
-rw-r--r--xlators/cluster/afr/src/pump.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/pump.h b/xlators/cluster/afr/src/pump.h
index a46f9d7a5..394e6eab7 100644
--- a/xlators/cluster/afr/src/pump.h
+++ b/xlators/cluster/afr/src/pump.h
@@ -34,6 +34,7 @@
#define IS_ENTRY_PARENT(entry) (!strcmp (entry, ".."))
#define PUMP_CMD_START "trusted.glusterfs.pump.start"
+#define PUMP_CMD_COMMIT "trusted.glusterfs.pump.commit"
#define PUMP_CMD_ABORT "trusted.glusterfs.pump.abort"
#define PUMP_CMD_PAUSE "trusted.glusterfs.pump.pause"
#define PUMP_CMD_STATUS "trusted.glusterfs.pump.status"
@@ -51,6 +52,7 @@ typedef enum {
PUMP_STATE_RESUME, /* Pump is resuming from a previous pause */
PUMP_STATE_PAUSE, /* Pump is paused */
PUMP_STATE_ABORT, /* Pump is aborted */
+ PUMP_STATE_COMMIT, /* Pump is commited */
} pump_state_t;
typedef struct _pump_private {
@@ -64,6 +66,7 @@ typedef struct _pump_private {
gf_boolean_t pump_finished; /* Boolean to indicate pump termination */
char pump_start_pending; /* Boolean to mark start pending until
CHILD_UP */
+ call_stub_t *cleaner;
} pump_private_t;
void