Re: [PATCH v5 2/2] btrfs: add helper btrfs_num_devices() to deduce num_devices

2018-08-10 Thread David Sterba
On Fri, Aug 10, 2018 at 01:53:21PM +0800, Anand Jain wrote: > When the replace is running the fs_devices::num_devices also includes > the replace device, however in some operations like device delete and > balance it needs the actual num_devices without the repalce devices, so > now the function

[PATCH v5 2/2] btrfs: add helper btrfs_num_devices() to deduce num_devices

2018-08-09 Thread Anand Jain
When the replace is running the fs_devices::num_devices also includes the replace device, however in some operations like device delete and balance it needs the actual num_devices without the repalce devices, so now the function btrfs_num_devices() just provides that. And here is a scenario how