summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.h
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-06-29 19:12:28 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-07-09 23:51:26 -0700
commit3d21219cdd53a5b6ef62501b042626133b34e0c1 (patch)
tree54a88aa44c3a118678ffb23e71589fc216395875 /xlators/features/marker/src/marker-quota.h
parent7488acff20ef6ff8df76af07547695e0106f32ca (diff)
quota/marker: fix mem leak in marker
Problem-1) Now the marker accounting happens in background, There is a possibility that before completing create_xattr_txn another create txn can be initiated for the same inode. suppose if few 100 txns are initiated before completion, this can block all synctask threads waiting on a lock and this can also consume lot of memory and can take more time to complete the background accounting operation. This patch improves the locking mechanism which can improve the performance as well reduce memory consumption Problem-2) For every lookup and for all inodes in readdirp we were initiating a new txn, this can result in more txn pending in synctask queue and lead to huge memory consumption. inspect file/dir should start a txn only if there is some delta Problem-3) When there are multiple write operations on same inode and all the synctask threads are busy. As we are checking for updation_status flag in background, all txn will be move to synctask queue. This can increase the mem usage. Only one txn for inode in a queue will be sufficient, so check and set updation falg before moving txn to background Change-Id: Ic42ce00f0a50ce51c7128ba68a1b6a0699a1cd14 BUG: 1207735 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11457 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-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.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/xlators/features/marker/src/marker-quota.h b/xlators/features/marker/src/marker-quota.h
index 2a618976e75..e1d5c8519fd 100644
--- a/xlators/features/marker/src/marker-quota.h
+++ b/xlators/features/marker/src/marker-quota.h
@@ -83,6 +83,7 @@ struct quota_inode_ctx {
int64_t file_count;
int64_t dir_count;
int8_t dirty;
+ gf_boolean_t create_status;
gf_boolean_t updation_status;
gf_lock_t lock;
struct list_head contribution_head;
@@ -92,8 +93,6 @@ typedef struct quota_inode_ctx quota_inode_ctx_t;
struct quota_synctask {
xlator_t *this;
loc_t loc;
- dict_t *dict;
- struct iatt buf;
int64_t contri;
gf_boolean_t is_static;
};
@@ -148,8 +147,5 @@ int32_t
mq_rename_update_newpath (xlator_t *, loc_t *);
int32_t
-mq_inspect_file_xattr (xlator_t *this, loc_t *loc, dict_t *dict, struct iatt buf);
-
-int32_t
mq_forget (xlator_t *, quota_inode_ctx_t *);
#endif