summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2015-02-09 18:28:21 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-24 06:37:19 -0700
commita20101e2e4d5f5595655544cfc798eb1d445638c (patch)
tree0c3ceb7ba0ba3bba7e41663d728fb2f60208e5a8 /libglusterfs
parent3c474a042aed68659fe0cfdf32e01285bde9f689 (diff)
Bitrot Stub
Bitrot stub implements object versioning required for identifying signature freshness. More details about versioning is explained as a part of the "bitrot feature documentation" patch. Change-Id: I2ad70d9eb109ba4a12148ab8d81336afda529ad9 BUG: 1170075 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/9709 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.h1
-rw-r--r--libglusterfs/src/glusterfs.h17
2 files changed, 18 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 5f67a162d59..c1deeef3c9d 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -117,6 +117,7 @@ enum _gf_client_pid
GF_CLIENT_PID_QUOTA_MOUNT = -5,
GF_CLIENT_PID_AFR_SELF_HEALD = -6,
GF_CLIENT_PID_GLFS_HEAL = -7,
+ GF_CLIENT_PID_BITD = -8,
};
enum _gf_xlator_ipc_targets {
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 095ca2a1388..bcc9f57f99b 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -117,6 +117,23 @@
#define GET_ANCESTRY_PATH_KEY "glusterfs.ancestry.path"
#define GET_ANCESTRY_DENTRY_KEY "glusterfs.ancestry.dentry"
+#define BITROT_DEFAULT_CURRENT_VERSION (unsigned long)1
+#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"
+
+/* GET/SET object signature */
+#define GLUSTERFS_GET_OBJECT_SIGNATURE "trusted.glusterfs.get-signature"
+#define GLUSTERFS_SET_OBJECT_SIGNATURE "trusted.glusterfs.set-signature"
+
+/* operation needs to be durable on-disk */
+#define GLUSTERFS_DURABLE_OP "trusted.glusterfs.durable-op"
+
+/* key for version exchange b/w bitrot stub and changelog */
+#define GLUSTERFS_VERSION_XCHG_KEY "glusterfs.version.xchg"
+
#define GLUSTERFS_INTERNAL_FOP_KEY "glusterfs-internal-fop"
#define ZR_FILE_CONTENT_STR "glusterfs.file."