From: Fan Yong Date: Sun, 6 Nov 2016 13:57:55 +0000 (+0800) Subject: LU-9040 scrub: handle group boundary properly (2) X-Git-Tag: 2.9.55~27 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=88c2664437b9110ee164aef176b1c126c23fdc1e LU-9040 scrub: handle group boundary properly (2) In the osd_inode_iteration() logic, if the next/exec method sets the iteration @offset variable just as group boundary: the LDISKFS_INODES_PER_GROUP(sb), the original logic cannot incrase the group#, as to the iteration repeats in the same groupc for ever. Signed-off-by: Fan Yong Change-Id: Ie55d8ffaed2257baed9761a30c09c62e23105434 Reviewed-on: https://review.whamcloud.com/26059 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao --- diff --git a/lustre/osd-ldiskfs/osd_scrub.c b/lustre/osd-ldiskfs/osd_scrub.c index 51f2bb0..514724f 100644 --- a/lustre/osd-ldiskfs/osd_scrub.c +++ b/lustre/osd-ldiskfs/osd_scrub.c @@ -1414,12 +1414,11 @@ full: RETURN(-EIO); } - while (param.offset < LDISKFS_INODES_PER_GROUP(param.sb) && - *count < max) { + while (*count < max) { struct osd_idmap_cache *oic = NULL; if (param.offset + - ldiskfs_itable_unused_count(param.sb, desc) > + ldiskfs_itable_unused_count(param.sb, desc) >= LDISKFS_INODES_PER_GROUP(param.sb)) { next_group = true; goto next_group;