Re: [PATCH 1/2] btrfs-progs: introduce btrfs_register_all_device()

2014-10-30 Thread Anand Jain
On 30/10/2014 22:33, David Sterba wrote: On Wed, Oct 15, 2014 at 08:51:09AM +0800, Anand Jain wrote: --- a/volumes.c +++ b/volumes.c @@ -30,6 +30,7 @@ #include "print-tree.h" #include "volumes.h" #include "math.h" +#include "utils.h" struct stripe { struct btrfs_device *dev; @

Re: [PATCH 1/2] btrfs-progs: introduce btrfs_register_all_device()

2014-10-30 Thread David Sterba
On Wed, Oct 15, 2014 at 08:51:09AM +0800, Anand Jain wrote: > --- a/volumes.c > +++ b/volumes.c > @@ -30,6 +30,7 @@ > #include "print-tree.h" > #include "volumes.h" > #include "math.h" > +#include "utils.h" > > struct stripe { > struct btrfs_device *dev; > @@ -1533,6 +1534,30 @@ btrfs_f

[PATCH 1/2] btrfs-progs: introduce btrfs_register_all_device()

2014-10-15 Thread Anand Jain
This function is to register all devices found after scanning the system. Before we had this functionality with in the btrfs_scan_lblkid(), however scanning and registering are two different distinct operation its better keep them separate. Also we want to optimize btrfs_scan_lblkid and avoid multi