path: root/xlators/storage
diff options
authorSanoj Unnikrishnan <>2018-02-23 15:26:20 +0530
committerRaghavendra G <>2018-03-28 04:07:12 +0000
commit04ede2e1635d664ea18e266544bffc569ae69bb8 (patch)
tree32a8846a0614421f40c22ddc9af88c638a2cb2bb /xlators/storage
parent7d95a6ff7182e67be8a49f59dbedb892da4a6ae8 (diff)
Quota: heal directory on newly added bricks when quota limit is reached
Problem: if a lookup is done on a newly added brick for a path on which limit has been reached, the lookup fails to heal the directory tree due to quota. Solution: Tag the lookup as an internal fop and ignore it in quota. Since marking internal fop does not usually give enough contextual information. Introducing new flags to pass the contextual info. Adding dict_check_flag and dict_set_flag to aid flag operations. A flag is a single bit in a bit array (currently limited to 256 bits). Change-Id: Ifb6a68bcaffedd425dd0f01f7db24edd5394c095 fixes: bz#1505355 BUG: 1505355 Signed-off-by: Sanoj Unnikrishnan <>
Diffstat (limited to 'xlators/storage')
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 816fb3587d2..6d7d8c512db 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -1208,6 +1208,10 @@ posix_handle_pair (xlator_t *this, const char *real_path,
} else if (!strncmp(key, POSIX_ACL_ACCESS_XATTR, strlen(key))
&& stbuf && IS_DHT_LINKFILE_MODE (stbuf)) {
goto out;
+ } else if (!strncmp(key, GF_INTERNAL_CTX_KEY, strlen(key))) {
+ /* ignore this key value pair */
+ ret = 0;
+ goto out;
} else {
sys_ret = sys_lsetxattr (real_path, key, value->data,
value->len, flags);