diff options
| author | Venky Shankar <vshankar@redhat.com> | 2014-02-19 20:47:46 +0530 |
|---|---|---|
| committer | Venky Shankar <vshankar@redhat.com> | 2014-05-14 05:10:15 -0700 |
| commit | d2db585ce7e26851178104433fa9422482d8719e (patch) | |
| tree | 2e52f15cf261906debd8ec54106ffe9f84af881e /xlators/features/changelog/src/changelog-misc.h | |
| parent | bfde478cedda8267134ee3807c8db5e042115eae (diff) | |
features/changelog : historical journal consumption.
Facilitates Glusterfs with the ability to detect file-operations
happened in past by scanning the back-end(brick-level) glusterfs
journal (changelog).
Design:
* List of changelogs produces in one perfectly running session are
stored in htime file which also holds necessary information about
the session start and end time.
* Involves fixed sized seeks to identify N'th changelog in the list.
* Requires O(log n), (where n is number of changelogs in the list),
time to identify the end changelog for the given start-end time
interval.
Currently the background processing of changelogs is sub optimal. BZ
1097041 tracks the development effort.
For complete design, refer the below link:
http://lists.nongnu.org/archive/html/gluster-devel/2014-02/msg00206.html
Change-Id: I27e49f75e492e843084d0ecaf9130224d08462a0
BUG: 1091961
Signed-off-by: Ajeet Jha <ajha@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Ajeet Jha <ajha@redhat.com>
Reviewed-on: http://review.gluster.org/6930
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-misc.h')
| -rw-r--r-- | xlators/features/changelog/src/changelog-misc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/features/changelog/src/changelog-misc.h b/xlators/features/changelog/src/changelog-misc.h index 127b03e2e1b..257c1f34218 100644 --- a/xlators/features/changelog/src/changelog-misc.h +++ b/xlators/features/changelog/src/changelog-misc.h @@ -16,6 +16,9 @@ #define CHANGELOG_MAX_TYPE 3 #define CHANGELOG_FILE_NAME "CHANGELOG" +#define HTIME_FILE_NAME "HTIME" +#define HTIME_KEY "trusted.glusterfs.htime" +#define HTIME_INITIAL_VALUE "0:0" #define CHANGELOG_VERSION_MAJOR 1 #define CHANGELOG_VERSION_MINOR 1 @@ -64,6 +67,10 @@ } \ } while (0) +#define CHANGELOG_FILL_HTIME_DIR(changelog_dir, path) do { \ + strcpy (path, changelog_dir); \ + strcat (path, "/htime"); \ + } while(0) /** * everything after 'CHANGELOG_TYPE_ENTRY' are internal types * (ie. none of the fops trigger this type of event), hence |
