diff options
author | Junaid <junaid@gluster.com> | 2011-04-12 10:01:28 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-13 00:38:55 -0700 |
commit | bdb3e709e3eec1863181339bf1a5b66b702ac1bb (patch) | |
tree | 7fcd85122078c2f0f0e8a6a9ff51ca03e6df6273 /xlators/features/marker/src/marker-common.c | |
parent | 4b6a08fba53d895c84676d8c3ae6a5ef45fa2286 (diff) |
features/marker: Filter the quota xattr's on getxattr with NULL name argument.
Signed-off-by: Junaid <junaid@gluster.com>
Signed-off-by: Anand Avati <avati@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-common.c')
-rw-r--r-- | xlators/features/marker/src/marker-common.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker-common.c b/xlators/features/marker/src/marker-common.c index a9431b6283b..9d27167fc0d 100644 --- a/xlators/features/marker/src/marker-common.c +++ b/xlators/features/marker/src/marker-common.c @@ -20,7 +20,7 @@ #define _CONFIG_H #include "config.h" #endif - +#include <fnmatch.h> #include "marker-common.h" marker_inode_ctx_t * @@ -69,3 +69,18 @@ unlock: UNLOCK (&inode->lock); return ret; } +void +marker_filter_quota_xattr (dict_t *dict, char *key, + data_t *value, void *data) +{ + int ret = -1; + + GF_VALIDATE_OR_GOTO ("marker", dict, out); + GF_VALIDATE_OR_GOTO ("marker", key, out); + + ret = fnmatch ("trusted.glusterfs.quota*", key, 0); + if (ret == 0) + dict_del (dict, key); +out: + return; +} |