On Wed, Mar 16, 2011 at 09:23:58PM +0300, Andrey Kuzmin wrote: > On Wed, Mar 16, 2011 at 8:44 PM, Josef Bacik <josef@xxxxxxxxxx> wrote: > > > Currently if we have corrupted items things will blow up in spectacular > > ways. > > So as we search check the item that we are pointing at currently to make > > sure it > > > > Will these checks run multiple times on the same slot? If yes, why not have > an in-memory bit 'checked' and skip checks of already checked items? Or > simply check once when loading from disk? > I thought about this but I have some reservations. In order to make sure the block is actually right we'd have to check the entire thing when it's read from disk, which isn't too bad, but what happens when only one item in the block is corrupt? For example if just the xattr item for an inode is corrupt, this method would keep you from reading the inode item in the same block which could be just fine. If this is acceptable for everybody then I don't mind doing it this way, but the current implementation makes sure we only check what we are actually interested in so we can have the best possible chance of limping along if only part of the block is bogus. Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
