Whamcloud - gitweb
LU-8085 scrub: increase iteration cursor to skip unused inodes 76/19876/3
authorFan Yong <fan.yong@intel.com>
Wed, 13 Apr 2016 08:48:39 +0000 (16:48 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 15 Aug 2016 21:10:50 +0000 (21:10 +0000)
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 <fan.yong@intel.com>
Change-Id: Ib7a63202a134ecc82070868b9630430f054b69fa
Reviewed-on: http://review.whamcloud.com/19876
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_scrub.c

index 3cd4e8c..0e497c3 100644 (file)
@@ -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, &param, &oic, noslot);
                        switch (rc) {