summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-01-25 16:09:12 +0530
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-01-30 19:31:50 +0530
commitd65f7b890a2554c9e3d0cafdb58ac257d4f26ab3 (patch)
tree32fb92ab62279ea56e1ada3d496b950d467b4cbc /common.h
parentb58e4765ed7e232f638ceb764b8ef1210bb43ff9 (diff)
gluster-blockd: implement transaction framework
This patch introduce the transaction locking also, start maintaining meta data journaling per block Every request is follows transaction, at the start of any transaction we take blocking lock on "/block-meta/meta.lock" file and at the end we unlock. Meanwhile while, when the transaction is in progress we do journaling, while performing series of operations, used for future purposes and roll backing. A sample journal file looks like: $ cat /mnt/block-meta/LUN1 GBID: xyz-abc SIZE : 5GiB HA: 3 ENTRYCREATE: INPROGRESS ENTRYCREATE: SUCCESS NODE1: INPROGRESS NODE2: INPROGRESS NODE3: INPROGRESS NODE2: SUCCESS NODE3: FAIL NODE1: SUCCESS NODE4: INPROGRESS NODE4: SUCCESS NODE3: CLEANUPSUCCESS <EOF> Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'common.h')
-rw-r--r--common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common.h b/common.h
index 46d40ee..4898fe7 100644
--- a/common.h
+++ b/common.h
@@ -14,6 +14,8 @@
# include "utils.h"
+# define LOG_FILE "/var/log/gluster-block/block.log"
+# define LOG_LEVEL 7
size_t glusterBlockCreateParseSize(char *value);