summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2012-01-19 18:09:34 +0530
committerVijay Bellur <vijay@gluster.com>2012-01-23 09:46:43 -0800
commit54b8d503dd23e72ed3076988c52e689f3554ebc8 (patch)
tree992f5e6e2b967fc2b67f0384dccadaffd95fa69e /xlators/mgmt
parent4e2a26eb285de9e0a5836ad5e2edbc14eb9adc80 (diff)
pump: move internal pump xattrs out of trusted domain
* the trusted.glusterfs.pump.{start|pause|commit|status|abort} xattrs have been moved out of trusted domain. This enables separation of xattrs used as gluster-internal commands (handled by pump) for replace-brick, which are not set in the back-end, from xattrs set on the replace-brick source and destinations bricks. * macros definitions from pump.h and glusterd.h, #defining these xattrs have been merged and put into libglusterfs/src/glusterfs.h Change-Id: I87b8bfbf045aa140f5d3f0c9baa9b2e79f87b67b BUG: 783049 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2663 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c11
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h7
2 files changed, 7 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index dfa9b5dd317..07da382c7c7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -25,6 +25,7 @@
#include "common-utils.h"
#include "cli1-xdr.h"
#include "xdr-generic.h"
+#include "glusterfs.h"
#include "glusterd.h"
#include "glusterd-op-sm.h"
#include "glusterd-store.h"
@@ -1083,7 +1084,7 @@ rb_do_operation_start (glusterd_volinfo_t *volinfo,
ret = rb_send_xattr_command (volinfo, src_brickinfo,
- dst_brickinfo, RB_PUMP_START_CMD,
+ dst_brickinfo, RB_PUMP_CMD_START,
start_value);
if (ret) {
gf_log ("", GF_LOG_DEBUG,
@@ -1128,7 +1129,7 @@ rb_do_operation_pause (glusterd_volinfo_t *volinfo,
"mounted the replace brick client");
ret = rb_send_xattr_command (volinfo, src_brickinfo,
- dst_brickinfo, RB_PUMP_PAUSE_CMD,
+ dst_brickinfo, RB_PUMP_CMD_PAUSE,
"jargon");
if (ret) {
gf_log ("", GF_LOG_DEBUG,
@@ -1201,7 +1202,7 @@ rb_do_operation_commit (glusterd_volinfo_t *volinfo,
"mounted the replace brick client");
cmd_ret = rb_send_xattr_command (volinfo, src_brickinfo,
- dst_brickinfo, RB_PUMP_COMMIT_CMD,
+ dst_brickinfo, RB_PUMP_CMD_COMMIT,
"jargon");
if (cmd_ret) {
gf_log ("", GF_LOG_DEBUG,
@@ -1247,7 +1248,7 @@ rb_do_operation_abort (glusterd_volinfo_t *volinfo,
"mounted the replace brick client");
ret = rb_send_xattr_command (volinfo, src_brickinfo,
- dst_brickinfo, RB_PUMP_ABORT_CMD,
+ dst_brickinfo, RB_PUMP_CMD_ABORT,
"jargon");
if (ret) {
gf_log ("", GF_LOG_DEBUG,
@@ -1353,7 +1354,7 @@ rb_do_operation_status (glusterd_volinfo_t *volinfo,
"mounted the replace brick client");
ret = rb_get_xattr_command (volinfo, src_brickinfo,
- dst_brickinfo, RB_PUMP_STATUS_CMD,
+ dst_brickinfo, RB_PUMP_CMD_STATUS,
status);
if (ret) {
gf_log ("", GF_LOG_DEBUG,
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 4723aec79cf..6e96192506f 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -263,12 +263,7 @@ enum glusterd_vol_comp_status_ {
#define GLUSTERD_BRICK_INFO_DIR "bricks"
#define GLUSTERD_CKSUM_FILE "cksum"
-/*All definitions related to replace brick */
-#define RB_PUMP_START_CMD "trusted.glusterfs.pump.start"
-#define RB_PUMP_PAUSE_CMD "trusted.glusterfs.pump.pause"
-#define RB_PUMP_COMMIT_CMD "trusted.glusterfs.pump.commit"
-#define RB_PUMP_ABORT_CMD "trusted.glusterfs.pump.abort"
-#define RB_PUMP_STATUS_CMD "trusted.glusterfs.pump.status"
+/* definitions related to replace brick */
#define RB_CLIENT_MOUNTPOINT "rb_mount"
#define RB_CLIENTVOL_FILENAME "rb_client.vol"
#define RB_DSTBRICK_PIDFILE "rb_dst_brick.pid"