summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/src/changelog-helpers.h
diff options
context:
space:
mode:
authorAjeet Jha <ajha@redhat.com>2014-08-23 19:06:45 +0530
committerVijay Bellur <vbellur@redhat.com>2014-08-26 03:16:53 -0700
commitacabde2c297c4175946565017ba17a251ad3fb1c (patch)
tree45a48a9f1c68b1966ce9c68dbb456997f62bdc63 /xlators/features/changelog/src/changelog-helpers.h
parentb56751b3b9a9ed3cceb2f0d221fa40ef94a8d516 (diff)
features/changelog: Crash consistency of changelog wrt snapshot
This patch introduces call-path fop details logging for data operations in CHANGELOG.SNAP. This feature is enabled with barrier-enable notification and disabled with barrier-disable notification. Change-Id: Ib548d34203eb99cea478a6baff402e82251c73a4 BUG: 1128093 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/8533 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-helpers.h')
-rw-r--r--xlators/features/changelog/src/changelog-helpers.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h
index 87888fb8c4f..9bd4a3ff37c 100644
--- a/xlators/features/changelog/src/changelog-helpers.h
+++ b/xlators/features/changelog/src/changelog-helpers.h
@@ -212,11 +212,17 @@ struct changelog_priv {
/* htime fd for current changelog session */
int htime_fd;
+ /* c_snap_fd is fd for call-path changelog */
+ int c_snap_fd;
+
/* rollover_count used by htime */
int rollover_count;
gf_lock_t lock;
+ /* lock to synchronize CSNAP updation */
+ gf_lock_t c_snap_lock;
+
/* writen end of the pipe */
int wfd;
@@ -431,6 +437,18 @@ changelog_drain_white_fops (xlator_t *this, changelog_priv_t *priv);
void
changelog_drain_black_fops (xlator_t *this, changelog_priv_t *priv);
+/* Crash consistency of changelog wrt snapshot */
+int
+changelog_snap_logging_stop ( xlator_t *this, changelog_priv_t *priv);
+int
+changelog_snap_logging_start ( xlator_t *this, changelog_priv_t *priv);
+int
+changelog_snap_open ( xlator_t *this, changelog_priv_t *priv);
+int
+changelog_snap_handle_ascii_change (xlator_t *this,
+ changelog_log_data_t *cld);
+int
+changelog_snap_write_change (changelog_priv_t *priv, char *buffer, size_t len);
/* Changelog barrier routines */
void __chlog_barrier_enqueue (xlator_t *this, call_stub_t *stub);
void __chlog_barrier_disable (xlator_t *this, struct list_head *queue);