diff options
-rw-r--r-- | libglusterfs/src/glusterfs.h | 7 | ||||
-rw-r--r-- | tests/bitrot/br-stub.c | 2 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot-scrub.c | 2 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot.c | 4 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/stub/bit-rot-stub.h | 1 |
5 files changed, 9 insertions, 7 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 3373ef6f7b8..513cf152b68 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com> + Copyright (c) 2008-2015 Red Hat, Inc. <http://www.redhat.com> This file is part of GlusterFS. This file is licensed to you under your choice of the GNU Lesser @@ -123,8 +123,9 @@ #define BITROT_DEFAULT_SIGNING_VERSION (unsigned long)0 /* on-disk object signature keys */ -#define BITROT_CURRENT_VERSION_KEY "trusted.glusterfs.bit-rot.version" -#define BITROT_SIGNING_VERSION_KEY "trusted.glusterfs.bit-rot.signature" +#define BITROT_OBJECT_BAD_KEY "trusted.bit-rot.bad-file" +#define BITROT_CURRENT_VERSION_KEY "trusted.bit-rot.version" +#define BITROT_SIGNING_VERSION_KEY "trusted.bit-rot.signature" /* on-disk size of signing xattr (not the signature itself) */ #define BITROT_SIGNING_XATTR_SIZE_KEY "trusted.glusterfs.bit-rot.size" diff --git a/tests/bitrot/br-stub.c b/tests/bitrot/br-stub.c index 81481f86905..6cb12ed0a8e 100644 --- a/tests/bitrot/br-stub.c +++ b/tests/bitrot/br-stub.c @@ -27,7 +27,7 @@ brstub_validate_version (char *bpath, unsigned long version) if (!xv) goto err; - ret = getxattr (bpath, "trusted.glusterfs.bit-rot.version", xv, xsize); + ret = getxattr (bpath, "trusted.bit-rot.version", xv, xsize); if (ret < 0) goto err; 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); |