Re: [bug] mkfs.btrfs reports device busy for ext4 mounted disk

2013-03-01 Thread Anand Jain
btrfs-progs shouldn't be unconditionally trusting the backup superblocks if the primary is garbage. It should only check the backups if the user specifically asks it to. Agreed. Let me add that all the rescue tools should accept a parameter to pick the backup superblocks. Currently fsck -s,

Re: [bug] mkfs.btrfs reports device busy for ext4 mounted disk

2013-02-22 Thread David Sterba
On Fri, Feb 22, 2013 at 11:03:25AM -0800, Zach Brown wrote: > > Next, since previously we had btrfs on sdb and mkfs.ext4 > > does not overwrite super-block mirror 1.. so > > > >btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64 > > sb_bytenr) > > > > finds btrfs on sdb. > > bt

Re: [bug] mkfs.btrfs reports device busy for ext4 mounted disk

2013-02-22 Thread Zach Brown
> Next, since previously we had btrfs on sdb and mkfs.ext4 > does not overwrite super-block mirror 1.. so > >btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64 > sb_bytenr) > > finds btrfs on sdb. btrfs-progs shouldn't be unconditionally trusting the backup superblocks if the

[bug] mkfs.btrfs reports device busy for ext4 mounted disk

2013-02-21 Thread Anand Jain
setup: mkfs.btrfs /dev/sdb mkfs.ext4 /dev/sdb && mount /dev/sdb /ext4 mkfs.btrfs /dev/sdc /dev/sdd test case: mkfs.btrfs /dev/sdc /dev/sdd problem: mkfs is fine, however reports the following error .. --- ERROR: unable to scan the device '/dev/sdb' - Device or resource busy ERROR: u