Fsck Revisited
OGAWA Hirofumi
hirofumi at mail.parknet.co.jp
Sun Jan 27 01:03:42 PST 2013
Daniel Phillips <daniel.raymond.phillips at gmail.com> writes:
> This algorithm is easily extended to repair inconsistent bitmaps. Simply copy
> any blocks that differ from the shadow to the allocation bitmap. This can be
> done in cache, then the above check may be repeated to verify success, prior
> to committing repaired bitmap blocks to disk. Note: the log may need to be
> adjusted to remove pending bitmap updates. Alternatively, log entries may be
> added rather than flushing bitmap blocks, creating a state consistent with a
> future rollup.
Copying shadow bitmap to bitmap blocks is not good. It requires to be
follow atomic-commit rules (i.e. redirect blocks to modify, and modify
pointers to blocks).
Instead, we can just use balloc/bfree and log_balloc/log_bfree to fix
difference of bitmap. With this, those operations are already following
atomic-commit rules (i.e. crash proof), and no need to care about
current logblock detail too.
To make log, we have to be on backend though. On userland, we can
violate to this rule, because no asynchronous (This is why mkfs can
reserve superblock on frontend).
Thanks.
--
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
More information about the Tux3
mailing list