diff options
author | Mohammed Junaid Ahmed <junaid@gluster.com> | 2011-03-15 22:25:55 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-16 00:32:11 -0700 |
commit | 4db0bc5977eb3e2d5bc0e3666bb6de5719d153a4 (patch) | |
tree | 6a1877fb9d143db23cb0b58391e430c3cc28a0e8 /xlators/features/marker/src/marker.h | |
parent | fa4e997970fb0e1d0abaae742a35701bcb576150 (diff) |
features/marker: QUOTA related changes in marker translator.
Signed-off-by: Junaid <junaid@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2473 (Support for volume and directory level quota)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
Diffstat (limited to 'xlators/features/marker/src/marker.h')
-rw-r--r-- | xlators/features/marker/src/marker.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker.h b/xlators/features/marker/src/marker.h index eeb64a16a87..5602456ff5d 100644 --- a/xlators/features/marker/src/marker.h +++ b/xlators/features/marker/src/marker.h @@ -16,11 +16,15 @@ <http://www.gnu.org/licenses/>. */ +#ifndef _MARKER_H +#define _MARKER_H + #ifndef _CONFIG_H #define _CONFIG_H #include "config.h" #endif +#include "marker-quota.h" #include "xlator.h" #include "defaults.h" #include "uuid.h" @@ -31,11 +35,18 @@ #define VOLUME_UUID "volume-uuid" #define TIMESTAMP_FILE "timestamp-file" +enum { + GF_QUOTA=1, + GF_GSYNC=2 +}; + /*initialize the local variable*/ #define MARKER_INIT_LOCAL(_frame,_local) do { \ _frame->local = _local; \ _local->pid = _frame->root->pid; \ memset (&_local->loc, 0, sizeof (loc_t)); \ + _local->ref = 1; \ + LOCK_INIT (&_local->lock); \ _local->oplocal = NULL; \ } while (0) @@ -54,15 +65,28 @@ struct marker_local{ uint32_t timebuf[2]; pid_t pid; loc_t loc; + int32_t ref; + gf_lock_t lock; struct marker_local *oplocal; }; typedef struct marker_local marker_local_t; +struct marker_inode_ctx { + struct quota_inode_ctx *quota_ctx; +}; +typedef struct marker_inode_ctx marker_inode_ctx_t; + struct marker_conf{ + char feature_enabled; + char *size_key; + char *dirty_key; char *volume_uuid; uuid_t volume_uuid_bin; char *timestamp_file; char *marker_xattr; }; typedef struct marker_conf marker_conf_t; + +int32_t k; +#endif |