Re: [PATCH v2] btrfs: Switch seed device to list api

Anand Jain
2020-08-30T14:39:20Z

On 16/7/20 3:25 pm, Nikolay Borisov wrote:
> While this patch touches a bunch of files the conversion is
> straighforward. Instead of using the implicit linked list anchored at
> btrfs_fs_devices::seed the code is switched to using
> list_for_each_entry. Previous patches in the series already factored out
> code that processed both main and seed devices so in those cases
> the factored out functions are called on the main fs_devices and then
> on every seed dev inside list_for_each_entry.
>
> Using list api also allows to simplify deletion from the seed dev list
> performed in btrfs_rm_device and btrfs_rm_dev_replace_free_srcdev by
> substituting a while() loop with a simple list_del_init.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>
> V2:
> * Removed tmp_fs_devices from btrfs_rm_dev_replace_free_srcdev. Reported by
> kernel test robot
>

Reviewed-by: Anand Jain <anand.jain@oracle.com>

Thanks, Anand