]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_fsr: fix attribute no_change_count logic
authorEric Sandeen <sandeen@redhat.com>
Sat, 26 Jan 2013 22:40:31 +0000 (22:40 +0000)
committerMark Tinguely <tinguely@eagdhcp-232-136.americas.sgi.com>
Thu, 21 Feb 2013 16:09:11 +0000 (10:09 -0600)
As it stands today, if no_change_count++ isn't > 10,
we will reset it to 0.  There's no way to get above 1
(let alone 10) so this isn't working as intended.

If we see progress (last_forkoff != tbstat.bs_forkoff)
*then* we sould reset the no_change_count counter to 0.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
fsr/xfs_fsr.c

index b5aa3db76f751b018080fc5512ca258e8f7fad21..5eaabb5298d7773018f596938777743e6f774caa 100644 (file)
@@ -1099,8 +1099,8 @@ fsr_setup_attr_fork(
                if (last_forkoff == tbstat.bs_forkoff) {
                        if (no_change_cnt++ > 10)
                                break;
-               }
-               no_change_cnt = 0;
+               } else /* progress! */
+                       no_change_cnt = 0;
                last_forkoff = tbstat.bs_forkoff;
 
                /* work out which way to grow the fork */