diff options
author | Vijay Bellur <vbellur@redhat.com> | 2013-08-15 00:47:01 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-08-15 00:48:23 +0530 |
commit | 20a7f6cbadcae64a0f0c0ef1ffaa5828ed8f7de0 (patch) | |
tree | a56ef6a4e102755c30014d14a2785a6c7875d5fa | |
parent | 4c492eba4a58d69770d4022e46058107c24abfdf (diff) |
features/quota: rename friendly changes
Change-Id: I510a3f068ab141a707fd6535d51d4b3fa37930f0
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/features/quota/src/quota.c | 17 | ||||
-rw-r--r-- | xlators/features/quota/src/quota.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 08cbb65a..54a16a4f 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -1265,6 +1265,9 @@ quota_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = (quota_local_t *) frame->local; + if (local->skip_check) + goto out; + inode_ctx_get (local->loc.inode, this, &value); ctx = (quota_inode_ctx_t *)(unsigned long)value; @@ -1320,6 +1323,11 @@ quota_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag, frame->local = local; + if (xdata && dict_get (xdata, GLUSTERFS_INTERNAL_FOP_KEY)) { + local->skip_check = _gf_true; + goto wind; + } + ret = loc_copy (&local->loc, loc); if (ret) { gf_log (this->name, GF_LOG_WARNING, "loc_copy failed"); @@ -1361,6 +1369,9 @@ quota_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = (quota_local_t *) frame->local; + if (local->skip_check) + goto out; + quota_update_size (this, local->loc.parent, NULL, NULL, (buf->ia_blocks * 512)); @@ -1472,8 +1483,14 @@ quota_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc, goto err; } + frame->local = (void *) local; + if (xdata && dict_get (xdata, GLUSTERFS_INTERNAL_FOP_KEY)) { + local->skip_check = _gf_true; + goto wind; + } + ret = loc_copy (&local->loc, newloc); if (ret == -1) { gf_log (this->name, GF_LOG_WARNING, "loc_copy failed"); diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h index 11022895..b0910751 100644 --- a/xlators/features/quota/src/quota.h +++ b/xlators/features/quota/src/quota.h @@ -159,6 +159,7 @@ struct quota_local { int32_t op_ret; int32_t op_errno; int64_t size; + gf_boolean_t skip_check; char just_validated; fop_lookup_cbk_t validate_cbk; inode_t *inode; |