From 9acae44525798d7275c490c4e941fa88d214e46e Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Fri, 24 Apr 2015 21:43:25 +0530 Subject: bitrot/scrub: fix induced throttling in syncop_ftw_throttle() Failing to reset scanning counter causes "incorrect" delay of around 50 seconds per directory entry. This causes scrubber to run extremely slowly. [ NOTE: This is a temporary fix. With the introduction of token bucket based throttling, inducing throttle via sleep() call would be unneeded. ] Also, fix logging messages in scrubber to log brick and full path of the object which is identified/marked as corrupted. > Change-Id: Id501bd15dcdbd8a09613f80f9d84050304740027 > BUG: 1170075 > Signed-off-by: Venky Shankar > Reviewed-on: http://review.gluster.org/10375 > Tested-by: NetBSD Build System > Tested-by: Gluster Build System > Reviewed-by: Raghavendra Bhat > Reviewed-by: Gaurav Kumar Garg Change-Id: I78f227f52f12549d62ecb35cbb70121424f7c2a7 BUG: 1220041 Reviewed-on: http://review.gluster.org/10714 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/syncop-utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/syncop-utils.c b/libglusterfs/src/syncop-utils.c index 2f3b50f18cd..349fa92d64f 100644 --- a/libglusterfs/src/syncop-utils.c +++ b/libglusterfs/src/syncop-utils.c @@ -187,8 +187,10 @@ syncop_ftw_throttle (xlator_t *subvol, loc_t *loc, int pid, void *data, !strcmp (entry->d_name, "..")) continue; - if (++tmp >= count) + if (++tmp >= count) { + tmp = 0; sleep (sleep_time); + } gf_link_inode_from_dirent (NULL, fd->inode, entry); -- cgit