diff options
| author | Ajeet Jha <ajha@redhat.com> | 2014-08-23 19:06:45 +0530 |
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-08 07:12:47 -0700 |
| commit | c99fe7a6e939f6a961d10a12cb03dcecf4a56885 (patch) | |
| tree | 53be1ab561a48ae45f021f55dfd4151323d66b3a /xlators/features/changelog/src/changelog-helpers.h | |
| parent | f32fc33a01d6b199ccecb7cb38eeb773c20585f5 (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.
BUG: 1138952
Change-Id: Ic418dd70b0a0b369202c5b79a6f7f96512821065
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>
Reviewed-on: http://review.gluster.org/8648
Diffstat (limited to 'xlators/features/changelog/src/changelog-helpers.h')
| -rw-r--r-- | xlators/features/changelog/src/changelog-helpers.h | 18 |
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 95f369bf936..d4af1ff3445 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); |
