btrfs: cleanup assigning next active device with a check
authorAnand Jain <anand.jain@oracle.com>
Tue, 3 May 2016 09:44:43 +0000 (17:44 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 4 May 2016 08:41:08 +0000 (10:41 +0200)
commit88acff64c621aaeee2a4fe0ed124c77358069bce
treebcb38903c2ae7e890fcc752f2ff3cd6a162025c3
parent8ed01abe7da6af62f2089da9a4c1fe839dc638f5
btrfs: cleanup assigning next active device with a check

Creates helper fucntion as needed by the device delete
and replace operations. Also now it checks if the next
device being assigned is an active device.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h