summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2018-12-28 07:27:11 +0530
committerKrutika Dhananjay <kdhananj@redhat.com>2019-01-14 06:41:20 +0000
commit4bbb0ecfac59f2ae8816640c516bb20b0b06aa44 (patch)
tree9f7d9087f1d5fc8c338093ab777772ad0ebd175c
parent0962e24c3d66c173155d80783eb5d1cc4ae3c99e (diff)
features/shard: Assign fop id during background deletion to prevent excessive logging
... of the kind "[2018-12-26 05:22:44.195019] E [MSGID: 133010] [shard.c:2253:shard_common_lookup_shards_cbk] 0-volume1-shard: Lookup on shard 785 failed. Base file gfid = cd938e64-bf06-476f-a5d4-d580a0d37416 [No such file or directory]" shard_common_lookup_shards_cbk() has a specific check to ignore ENOENT error without logging them during specific fops. But because background deletion is done in a new frame (with local->fop being GF_FOP_NULL), the ENOENT check is skipped and the absence of shards gets logged everytime. To fix this, local->fop is initialized to GF_FOP_UNLINK during background deletion. Change-Id: I0ca8d3b3bfbcd354b4a555eee520eb0479bcda35 updates: bz#1665803 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> (cherry picked from commit aa28fe32364e39981981d18c784e7f396d56153f)
-rw-r--r--xlators/features/shard/src/shard.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index ca91d4af65e..1e6a0205810 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -3500,6 +3500,7 @@ shard_delete_shards(void *opaque)
goto err;
}
cleanup_frame->local = local;
+ local->fop = GF_FOP_UNLINK;
local->xattr_req = dict_new();
if (!local->xattr_req) {