From 17454dfea9f3c4d47fcf0b5370a6155f639c8aeb Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Tue, 25 Feb 2014 09:17:18 +0530 Subject: glusterd: persistent client xlator/ afr changelog names -Add a unique brick-id field to glusterd_brickinfo_t -Persist the id to the brickinfo file -Use the brick-id as the client xlator name during vol create, add-brick and replace-brick operations. -For older volumes,generate the id in-memory during glusterd restore but defer writing it to the brickinfo file until the next volume set operation. -send and receive the brick-ids during peer probe. Feature page: www.gluster.org/community/documentation/index.php/Features/persistent-AFR-changelog-xattributes Related patch: http://review.gluster.org/#/c/7122 Change-Id: Ib7f1570004e33f4144476410eec2b84df4e41448 BUG: 1066778 Signed-off-by: Ravishankar N Reviewed-on: http://review.gluster.org/7155 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Kaushal M Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-utils.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index cd22b2960..aebf5fcef 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -29,6 +29,10 @@ #include "protocol-common.h" #define GLUSTERD_SOCK_DIR "/var/run" +#define GLUSTERD_ASSIGN_BRICKID_TO_BRICKINFO(brickinfo, volinfo, brickid) do {\ + sprintf (brickinfo->brick_id, "%s-client-%d",\ + volinfo->volname, brickid);\ +} while (0) struct glusterd_lock_ { uuid_t owner; @@ -124,6 +128,9 @@ int32_t glusterd_service_stop(const char *service, char *pidfile, int sig, gf_boolean_t force_kill); +int +glusterd_get_next_available_brickid (glusterd_volinfo_t *volinfo); + int32_t glusterd_resolve_brick (glusterd_brickinfo_t *brickinfo); -- cgit