fsck: prevent running over 100% completion
commit5151d6de495d0ce1cbf46ff38d6fe5a070f42997
authorEric Wong <normalperson@yhbt.net>
Fri, 18 May 2012 01:13:39 +0000 (18 01:13 +0000)
committerEric Wong <normalperson@yhbt.net>
Fri, 18 May 2012 01:27:31 +0000 (18 01:27 +0000)
tree5072e6ceba687a72ced4d122acaaa2d2cfb3aabc
parentfa1a6af3d35da8e1d0c271c3dd0c861cc71c5566
fsck: prevent running over 100% completion

FIDs may be created while fsck is running, causing "mogadm fsck
status" to report completion above 100% (and thus confusing
users).  Stopping fsck when it reaches fsck_fid_at_end (set to
MAX(fid) at fsck startup) prevents this.

This change should also have a pleasant side effect of reducing
contention with replicate workers on newly-uploaded FIDs.

ref: http://code.google.com/p/mogilefs/issues/detail?id=50
lib/MogileFS/Store.pm
lib/MogileFS/Worker/JobMaster.pm
t/60-fsck.t