From b03f9699055eed3f1c5d73e36bbe8474a1419304 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Thu, 9 Apr 2015 16:26:31 +0530 Subject: features/bitrot: Follow xattr naming conventions Instead of "trusted.glusterfs.bit-rot.*" use "trusted.bit-rot.*" NOTE: With this patch, data on existing volumes would be resigned (which should be OK as of now since we do not expect many users as of now :-)) Change-Id: I926c7bca266a9c8f2cb35d57c4d0359aa5cecfa0 BUG: 1170075 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/10181 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/bit-rot/src/bitd/bit-rot-scrub.c | 2 +- xlators/features/bit-rot/src/bitd/bit-rot.c | 4 ++-- xlators/features/bit-rot/src/stub/bit-rot-stub.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'xlators/features/bit-rot') diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c index dd6abcd9f67..e0581a40df0 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c @@ -214,7 +214,7 @@ bitd_compare_ckum (xlator_t *this, goto out; } - ret = dict_set_int32 (xattr, "trusted.glusterfs.bad-file", _gf_true); + ret = dict_set_int32 (xattr, BITROT_OBJECT_BAD_KEY, _gf_true); if (ret) { gf_log (this->name, GF_LOG_ERROR, "Error setting bad-file marker for %s [GFID: %s | " diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c index b7ffe762c80..d985cc4442c 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot.c @@ -169,11 +169,11 @@ bitd_is_bad_file (xlator_t *this, br_child_t *child, loc_t *loc, fd_t *fd) if (fd) ret = syncop_fgetxattr (child->xl, fd, &xattr, - "trusted.glusterfs.bad-file", NULL, + BITROT_OBJECT_BAD_KEY, NULL, NULL); else if (loc) ret = syncop_getxattr (child->xl, loc, &xattr, - "trusted.glusterfs.bad-file", NULL, + BITROT_OBJECT_BAD_KEY, NULL, NULL); if (!ret) { diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.h b/xlators/features/bit-rot/src/stub/bit-rot-stub.h index 5db0e321c20..86090bfb877 100644 --- a/xlators/features/bit-rot/src/stub/bit-rot-stub.h +++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.h @@ -261,6 +261,7 @@ static inline void br_stub_remove_vxattrs (dict_t *xattr) { if (xattr) { + dict_del (xattr, BITROT_OBJECT_BAD_KEY); dict_del (xattr, BITROT_CURRENT_VERSION_KEY); dict_del (xattr, BITROT_SIGNING_VERSION_KEY); dict_del (xattr, BITROT_SIGNING_XATTR_SIZE_KEY); -- cgit