summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota-helper.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-05-29 17:54:45 +0530
committerXavi Hernandez <xhernandez@redhat.com>2019-05-30 07:35:21 +0000
commit002f4736cd470c20f427d8c25916abb4b95c9240 (patch)
treeb2968d6a7a3db6c9b74faa0a1e746351f0bf7736 /xlators/features/marker/src/marker-quota-helper.c
parent71caf1423fe5f0eed652210f8158c95fc8a10219 (diff)
marker: remove some unused functions
After basic analysis, found that these methods were not being used at all. updates: bz#1693692 Change-Id: If9cfa1ab189e6e7b56230c4e1d8e11f9694a9a65 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota-helper.c')
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c93
1 files changed, 0 insertions, 93 deletions
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index 6edb285b180..ecd85d67b2b 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -378,96 +378,3 @@ mq_inode_ctx_new(inode_t *inode, xlator_t *this)
{
return __mq_inode_ctx_new(inode, this);
}
-
-quota_local_t *
-mq_local_new()
-{
- quota_local_t *local = NULL;
-
- local = mem_get0(THIS->local_pool);
- if (!local)
- goto out;
-
- local->ref = 1;
- LOCK_INIT(&local->lock);
-
- local->ctx = NULL;
- local->contri = NULL;
-
-out:
- return local;
-}
-
-quota_local_t *
-mq_local_ref(quota_local_t *local)
-{
- LOCK(&local->lock);
- {
- local->ref++;
- }
- UNLOCK(&local->lock);
-
- return local;
-}
-
-int32_t
-mq_local_unref(xlator_t *this, quota_local_t *local)
-{
- int32_t ref = 0;
- if (local == NULL)
- goto out;
-
- QUOTA_SAFE_DECREMENT(&local->lock, local->ref, ref);
-
- if (ref != 0)
- goto out;
-
- if (local->fd != NULL)
- fd_unref(local->fd);
-
- if (local->contri)
- GF_REF_PUT(local->contri);
-
- if (local->xdata)
- dict_unref(local->xdata);
-
- loc_wipe(&local->loc);
-
- loc_wipe(&local->parent_loc);
-
- LOCK_DESTROY(&local->lock);
-
- mem_put(local);
-out:
- return 0;
-}
-
-inode_contribution_t *
-mq_get_contribution_from_loc(xlator_t *this, loc_t *loc)
-{
- int32_t ret = 0;
- quota_inode_ctx_t *ctx = NULL;
- inode_contribution_t *contribution = NULL;
-
- ret = mq_inode_ctx_get(loc->inode, this, &ctx);
- if (ret < 0) {
- gf_log_callingfn(this->name, GF_LOG_WARNING,
- "cannot get marker-quota context from inode "
- "(gfid:%s, path:%s)",
- uuid_utoa(loc->inode->gfid), loc->path);
- goto err;
- }
-
- contribution = mq_get_contribution_node(loc->parent, ctx);
- if (contribution == NULL) {
- gf_log_callingfn(this->name, GF_LOG_WARNING,
- "inode (gfid:%s, path:%s) has "
- "no contribution towards parent (gfid:%s)",
- uuid_utoa(loc->inode->gfid), loc->path,
- uuid_utoa(loc->parent->gfid));
- goto err;
- }
-
-err:
- return contribution;
-}