summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.h
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2016-04-06 14:09:50 +0530
committerVijaikumar Mallikarjuna <vmallika@redhat.com>2016-04-06 05:15:00 -0700
commitcd22b5c1a490444620c1d19ce22672ff1cd478a6 (patch)
treec9746ae83e6bc2bdbf5d89668674803d7f1403c3 /xlators/features/marker/src/marker-quota.h
parent1546572b7d46c1aee906608140c843160a529937 (diff)
marker: do mq_reduce_parent_size_txn in FG for unlink & rmdir
* If a "rm -rf" is performed by a client, we initiate a marker background operation mq_reduce_parent_size_txn for rmdir and unlink. mq_reduce_parent_size_txn can fail when updating size on the ancestor directories, if these directories are removed during the txn as the child-parent association removed in the dentry list. So execute mq_reduce_parent_size_txn in foreground and then do the UNWIND for rmdir and unlink FOP Change-Id: Iefcdced4c6ae0dbd43f92814d0ddcd1e33825864 BUG: 1322489 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13874 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.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 319fafd9983..51e062537b8 100644
--- a/xlators/features/marker/src/marker-quota.h
+++ b/xlators/features/marker/src/marker-quota.h
@@ -14,6 +14,7 @@
#include "marker-mem-types.h"
#include "refcount.h"
#include "quota-common-utils.h"
+#include "call-stub.h"
#define QUOTA_XATTR_PREFIX "trusted.glusterfs"
#define QUOTA_DIRTY_KEY "trusted.glusterfs.quota.dirty"
@@ -116,6 +117,7 @@ struct quota_synctask {
quota_meta_t contri;
gf_boolean_t is_static;
uint32_t ia_nlink;
+ call_stub_t *stub;
};
typedef struct quota_synctask quota_synctask_t;
@@ -147,7 +149,7 @@ 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 *,
- uint32_t nlink);
+ uint32_t nlink, call_stub_t *stub);
int32_t
mq_forget (xlator_t *, quota_inode_ctx_t *);