josefbacik/btrfs-progs — pull request #11 by lakeman (2012-07-30 00:37:50+00:00)
Title: Patched btrfsck to allow rebuilding a superblock from an old tree / generation.

Facing a 3.0 kernel corrupt superblock I wanted a way to use the output of find-root to fix it without needing to find enough storage space for a full restore and rebuild (though I may end up needing to do that anyway...).
So I patched btrfsck so it can take a tree & generation parameter, and optionally commit the changes.

Obviously this should be considered a last resort when trying to recover a failed filesystem.

Modifying btrfs-select-super might have made more sense, but I've gotten past my issue now and can mount my filesystem so I don't need to test this process again.