path: root/xlators/features/changelog/lib/src/gf-changelog-helpers.h
diff options
authorKotresh H R <>2014-02-13 23:53:27 +0530
committerVijay Bellur <>2014-04-28 04:53:36 -0700
commitf2bac9f9d5b9956969ddd25a54bc636b82f6923e (patch)
treefa0a3987f4685e6e8a83dbb9234c860757dd5304 /xlators/features/changelog/lib/src/gf-changelog-helpers.h
parent54a5a42848870ee17b923c6c37d65fdfe4a5fec9 (diff)
features/libgfchangelog: APIs to process history changelogs.
1. Create directories in following fashion for history API's usage when consumer is registered with libgfchangelog shared library through gf_changelog_register. scratch_dir/.history scratch_dir/.history/.current scratch_dir/.history/.processed scratch_dir/.history/.processing 2. Added new file 'gf-history-changelog.c' and following APIs are provided for consumers to process history changelogs. 1. gf_history_changelog_scan: Move processed history changelog file from .processing to .processed 2. gf_history_changelog_next_change: Return the next history changelog file entry. Zero means all history chanelogs are consumed. 3. gf_history_changelog_done: Scan .processing directory and generate a list of change entries. 4. gf_history_changelog_start_fresh: For a set of changelogs, start from the begining. NOTE: Though this patch provides above funcationalities. It is considered functionally full with the patch ( Change-Id: I200780c7278e0a6c008910d93faad5858a4b3e76 Original-author: Kotresh H R <> Signed-off-by: Kotresh H R <> Signed-off-by: Ajeet Jha <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Venky Shankar <> Tested-by: Venky Shankar <>
Diffstat (limited to 'xlators/features/changelog/lib/src/gf-changelog-helpers.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog-helpers.h b/xlators/features/changelog/lib/src/gf-changelog-helpers.h
index 7e13d9376..2d545da9e 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-helpers.h
+++ b/xlators/features/changelog/lib/src/gf-changelog-helpers.h
@@ -23,6 +23,7 @@
#define GF_CHANGELOG_CURRENT_DIR ".current"
#define GF_CHANGELOG_PROCESSED_DIR ".processed"
#define GF_CHANGELOG_PROCESSING_DIR ".processing"
+#define GF_CHANGELOG_HISTORY_DIR ".history"
#ifndef MAXLINE
#define MAXLINE 4096
@@ -68,6 +69,9 @@ typedef struct gf_changelog {
char gfc_processing_dir[PATH_MAX];
pthread_t gfc_changelog_processor;
+ /* Holds gfc for History API */
+ struct gf_changelog *hist_gfc;
} gf_changelog_t;