From: Fan Yong Date: Wed, 13 Apr 2016 08:48:39 +0000 (+0800) Subject: LU-8085 scrub: increase iteration cursor to skip unused inodes X-Git-Tag: 2.8.57~35 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F76%2F19876%2F3;p=fs%2Flustre-release.git LU-8085 scrub: increase iteration cursor to skip unused inodes After the OI scrub iteration handled the last used bits in the inode table, it should increase the iteration position to next group before the jump to avoid loop for ever. Signed-off-by: Fan Yong Change-Id: Ib7a63202a134ecc82070868b9630430f054b69fa Reviewed-on: http://review.whamcloud.com/19876 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- diff --git a/lustre/osd-ldiskfs/osd_scrub.c b/lustre/osd-ldiskfs/osd_scrub.c index 3cd4e8c..0e497c3 100644 --- a/lustre/osd-ldiskfs/osd_scrub.c +++ b/lustre/osd-ldiskfs/osd_scrub.c @@ -1415,8 +1415,11 @@ full: *count < max) { if (param.offset + ldiskfs_itable_unused_count(param.sb, desc) > - LDISKFS_INODES_PER_GROUP(param.sb)) + LDISKFS_INODES_PER_GROUP(param.sb)) { + *pos = 1 + (param.bg + 1) * + LDISKFS_INODES_PER_GROUP(param.sb); goto next_group; + } rc = next(info, dev, ¶m, &oic, noslot); switch (rc) {