If the old btrfs is over written with newer btrfs SB, and if mkfs.btrfs
is not overwriting all the copies of SB then its a mkfs.btrfs bug.
Nope.
If the new btrfs is a smaller one than original btrfs, the 2nd super can
still be there.
Oh right, the mkfs.btrfs -b <SIZE> option, where we don't
use entire device.
Here the source of the problem is having the stale SB which is
created by previous btrfs, and at the time of mkfs we do notice
that there is a stale SB, so we already know how many copy of SB
were there, but we are bit conservative not to clean all SBs.
Its important to fix the problem end (mkfs), not the victim end
(sb recovery).
But looks like not everyone agrees to this view, and sb self heal
will go wrong if mkfs does not clean all copy of SB, so now the
only way to recover it is by user intervention, so I am ok to add
mount -o sb_copy_num=<0|1|2>. Suggestions for any better name is
welcome.
Side check, any idea what's the use case around mkfs.btrfs -b option
other than for testing ?
Thanks, Anand
--
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