summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib/src/changelog.h
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 /xlators/features/changelog/lib/src/changelog.h
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 'xlators/features/changelog/lib/src/changelog.h')
-rw-r--r--xlators/features/changelog/lib/src/changelog.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/xlators/features/changelog/lib/src/changelog.h b/xlators/features/changelog/lib/src/changelog.h
index 1e0df053a96..08307810704 100644
--- a/xlators/features/changelog/lib/src/changelog.h
+++ b/xlators/features/changelog/lib/src/changelog.h
@@ -16,13 +16,15 @@ struct gf_brick_spec;
/**
* Max bit shiter for event selection
*/
-#define CHANGELOG_EV_SELECTION_RANGE 4
+#define CHANGELOG_EV_SELECTION_RANGE 5
-#define CHANGELOG_OP_TYPE_JOURNAL (1<<0)
-#define CHANGELOG_OP_TYPE_OPEN (1<<1)
-#define CHANGELOG_OP_TYPE_CREATE (1<<2)
-#define CHANGELOG_OP_TYPE_RELEASE (1<<3)
-#define CHANGELOG_OP_TYPE_MAX (1<<CHANGELOG_EV_SELECTION_RANGE)
+#define CHANGELOG_OP_TYPE_JOURNAL (1<<0)
+#define CHANGELOG_OP_TYPE_OPEN (1<<1)
+#define CHANGELOG_OP_TYPE_CREATE (1<<2)
+#define CHANGELOG_OP_TYPE_RELEASE (1<<3)
+#define CHANGELOG_OP_TYPE_BR_RELEASE (1<<4) /* logical release (last close()),
+ sent by bitrot stub */
+#define CHANGELOG_OP_TYPE_MAX (1<<CHANGELOG_EV_SELECTION_RANGE)
struct ev_open {
@@ -39,17 +41,25 @@ struct ev_release {
unsigned char gfid[16];
};
+struct ev_release_br {
+ int32_t flags;
+ unsigned long version;
+ unsigned char gfid[16];
+};
+
struct ev_changelog {
char path[PATH_MAX];
};
typedef struct changelog_event {
unsigned int ev_type;
+
union {
struct ev_open open;
struct ev_creat create;
struct ev_release release;
struct ev_changelog journal;
+ struct ev_release_br releasebr;
} u;
} changelog_event_t;