summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.h
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-11-02 15:39:46 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-11-09 03:12:26 -0800
commit2794cb71b96c44033dcd01102039c038956cf7b5 (patch)
tree0dc5459474f4e07ba0e75a81b79b0ae99db850bb /xlators/features/marker/src/marker-quota.h
parentc8c9308134ae4ce24c630a1b0ccfcf4e8f9b0fe7 (diff)
marker: do remove xattr only for last link
With unlink, rename, rmdir, contribution xattrs are removed. If the file is a last link then remove_xattr will fail with ENOENT. So it better to perform remove_xattr only if there are more links to the file Change-Id: Ifc1e7fda4d310fd87f6f28a635c9ea78b8f3929d BUG: 1257694 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12033 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> 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.h4
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 304c0ffa2a0..dc953704d11 100644
--- a/xlators/features/marker/src/marker-quota.h
+++ b/xlators/features/marker/src/marker-quota.h
@@ -115,6 +115,7 @@ struct quota_synctask {
loc_t loc;
quota_meta_t contri;
gf_boolean_t is_static;
+ uint32_t ia_nlink;
};
typedef struct quota_synctask quota_synctask_t;
@@ -145,7 +146,8 @@ int
mq_create_xattrs_txn (xlator_t *this, loc_t *loc, struct iatt *buf);
int32_t
-mq_reduce_parent_size_txn (xlator_t *, loc_t *, quota_meta_t *);
+mq_reduce_parent_size_txn (xlator_t *, loc_t *, quota_meta_t *,
+ uint32_t nlink);
int32_t
mq_forget (xlator_t *, quota_inode_ctx_t *);