diff options
author | vmallika <vmallika@redhat.com> | 2015-06-24 11:56:30 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-06-25 02:02:14 -0700 |
commit | 9b1305e549879e7698c46553bd91c722877d44cb (patch) | |
tree | ecd4541c3e022268bf9378927e09e901306a8019 /xlators/features/marker/src/marker-quota.h | |
parent | a1e32fbcfbfaf6e4c63e140b3b90a80dc748a269 (diff) |
quota/marker: fix mem-leak in marker
When removing contribution xattr, we also need to free
contribution node in memory.
Use ref/unref mechanism to handle contribution node memory
local->xdata should be freed in mq_local_unref
There is another huge memory consumption happens
in function mq_inspect_directory_xattr_task
where dirty flag is not set.
Change-Id: Ieca3ab4bf410c51259560e778bce4e81b9d888bf
BUG: 1207735
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11361
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota.h')
-rw-r--r-- | xlators/features/marker/src/marker-quota.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker-quota.h b/xlators/features/marker/src/marker-quota.h index 9dfac2e3bb5..2a618976e75 100644 --- a/xlators/features/marker/src/marker-quota.h +++ b/xlators/features/marker/src/marker-quota.h @@ -12,6 +12,7 @@ #include "xlator.h" #include "marker-mem-types.h" +#include "refcount.h" #define QUOTA_XATTR_PREFIX "trusted.glusterfs" #define QUOTA_DIRTY_KEY "trusted.glusterfs.quota.dirty" @@ -104,7 +105,8 @@ struct inode_contribution { int64_t file_count; int64_t dir_count; uuid_t gfid; - gf_lock_t lock; + gf_lock_t lock; + GF_REF_DECL; }; typedef struct inode_contribution inode_contribution_t; |