From 4c1489de3be5bbde110e8bba5986aacebcbc08a1 Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Wed, 13 Apr 2016 16:48:39 +0800 Subject: [PATCH] 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 --- lustre/osd-ldiskfs/osd_scrub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 1.8.3.1