diff options
| -rw-r--r-- | xlators/features/marker/src/marker-quota.c | 32 | ||||
| -rw-r--r-- | xlators/features/marker/src/marker.c | 14 | 
2 files changed, 27 insertions, 19 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 87eae1dbfe9..c20fc4f89c0 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -406,10 +406,10 @@ quota_readdir_cbk (call_frame_t *frame,          local->frame = frame;          list_for_each_entry (entry, (&entries->list), list) { -                gf_log (this->name, GF_LOG_INFO, "entry  = %s", entry->d_name); +                gf_log (this->name, GF_LOG_DEBUG, "entry  = %s", entry->d_name);                  if ((!strcmp (entry->d_name, ".")) || (!strcmp (entry->d_name, ".."))) { -                        gf_log (this->name, GF_LOG_INFO, "entry  = %s", entry->d_name); +                        gf_log (this->name, GF_LOG_DEBUG, "entry  = %s", entry->d_name);                          offset = entry->d_off;                          continue;                  } @@ -478,10 +478,10 @@ quota_readdir_cbk (call_frame_t *frame,                          break;                  }          } -        gf_log (this->name, GF_LOG_INFO, "offset before =%"PRIu64, +        gf_log (this->name, GF_LOG_DEBUG, "offset before =%"PRIu64,                  local->d_off);          local->d_off +=offset; -        gf_log (this->name, GF_LOG_INFO, "offset after = %"PRIu64, +        gf_log (this->name, GF_LOG_DEBUG, "offset after = %"PRIu64,                  local->d_off);          if (ret) @@ -899,7 +899,9 @@ quota_inodelk_cbk (call_frame_t *frame, void *cookie,          local = frame->local;          if (op_ret == -1 || local->err) { -                gf_log (this->name, GF_LOG_INFO, "lock setting failed"); +                gf_log (this->name, ((op_errno == ENOENT) ? GF_LOG_DEBUG : +                                     GF_LOG_INFO), +                        "lock setting failed");                  xattr_updation_done (frame, NULL, this, 0, 0, NULL);                  return 0; @@ -1060,7 +1062,9 @@ quota_update_parent_size (call_frame_t *frame,          local = frame->local;          if (op_ret == -1) { -                gf_log (this->name, GF_LOG_ERROR, "%s", strerror (op_errno)); +                gf_log (this->name, ((op_errno == ENOENT) ? GF_LOG_DEBUG : +                                     GF_LOG_ERROR), +                        "xattrop call failed: %s", strerror (op_errno));                  goto err;          } @@ -1108,7 +1112,7 @@ err:                  quota_release_parent_lock (frame, NULL, this, 0, 0);          } -        if (dict) +        if (newdict)                  dict_unref (newdict);          return 0; @@ -1135,8 +1139,10 @@ quota_update_inode_contribution (call_frame_t *frame, void *cookie,          local = frame->local;          if (op_ret == -1) { -                gf_log (this->name, GF_LOG_ERROR, "failed to get size and " -                        "contribution with %s error", strerror (op_errno)); +                gf_log (this->name, ((op_errno == ENOENT) ? GF_LOG_DEBUG : +                                     GF_LOG_WARNING), +                        "failed to get size and contribution with %s error", +                        strerror (op_errno));                  goto err;          } @@ -1301,8 +1307,8 @@ quota_markdirty (call_frame_t *frame, void *cookie,          if (op_ret == -1){                  gf_log (this->name, GF_LOG_ERROR, -                        "lock setting failed on %s", -                        local->parent_loc.path); +                        "lock setting failed on %s (%s)", +                        local->parent_loc.path, strerror (op_errno));                  local->err = 1; @@ -1523,8 +1529,8 @@ inspect_directory_xattr (xlator_t *this,          ctx->size = ntoh64 (*size); -        gf_log (this->name, GF_LOG_INFO, "size=%"PRId64 -                "contri=%"PRId64, ctx->size, +        gf_log (this->name, GF_LOG_DEBUG, "size=%"PRId64 +                " contri=%"PRId64, ctx->size,                  contribution?contribution->contribution:0);          ctx->dirty = dirty; diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index d7125bb403d..074ee5762b3 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1484,15 +1484,17 @@ marker_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          marker_local_t     *local   = NULL;          marker_conf_t      *priv    = NULL; -        if (op_ret == -1) { -                gf_log (this->name, GF_LOG_ERROR, "%s occured while " -                        "creating symlinks ", strerror (op_errno)); -        } -          local = (marker_local_t *) frame->local;          frame->local = NULL; +        if (op_ret == -1) { +                gf_log (this->name, ((op_errno == ENOENT) ? GF_LOG_DEBUG : +                                     GF_LOG_ERROR), +                        "%s occured while creating symlinks for %s", +                        strerror (op_errno), local->loc.path); +        } +          STACK_UNWIND_STRICT (setattr, frame, op_ret, op_errno, statpre,                               statpost); @@ -1660,7 +1662,7 @@ marker_lookup (call_frame_t *frame, xlator_t *this,          if (ret == -1)                  goto err; -        if (priv->feature_enabled & GF_QUOTA) +        if ((priv->feature_enabled & GF_QUOTA) && xattr_req)                  quota_req_xattr (this, loc, xattr_req);  wind:          STACK_WIND (frame, marker_lookup_cbk, FIRST_CHILD(this),  | 
