Whamcloud - gitweb
LU-9040 scrub: handle group boundary properly (2) 59/26059/2
authorFan Yong <fan.yong@intel.com>
Sun, 6 Nov 2016 13:57:55 +0000 (21:57 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 26 Mar 2017 06:48:49 +0000 (06:48 +0000)
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 <fan.yong@intel.com>
Change-Id: Ie55d8ffaed2257baed9761a30c09c62e23105434
Reviewed-on: https://review.whamcloud.com/26059
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
lustre/osd-ldiskfs/osd_scrub.c

index 51f2bb0..514724f 100644 (file)
@@ -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;