On Tue, Mar 05, 2013 at 12:25:37AM +0800, Liu Bo wrote: > We first use btrfs_std_error hook to replace with BUG_ON, and we > also need to cleanup what is left, including reloc roots rbtree > and reloc roots list. > Here we use a helper function to cleanup both rbtree and list, and > since this function can also be used in the balance recover path, > we also make the change as well to keep code simple.
I've noticed that return value from merge_reloc_roots is never checked in the callers. Did you verify that this is ok? For example when called from btrfs_recover_relocation, is it possible that the reloc-to-be-recovered is still left unprocessed but the filesystem is going to be silently mounted read-write? The mount and remount callpaths check for recover_relocation errors and do not proceed otherwise. In RO mount, it's not called. So, either merge_reloc_roots callers should catch the errors or there are none by design (ie. the whole reloc operation is restartable). david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html