Re: [PATCH 4/5] btrfs: Simplify setting/clearing fs_info to btrfs_fs_devices

Anand Jain
2020-08-26T10:50:53Z

On 15/7/20 6:48 pm, Nikolay Borisov wrote:
> It makes no sense to have sysfs-related routines be responsible for
> properly initialising the fs_info pointer of struct btrfs_fs_device.
> Instead this can be streamlined by making it the responsibility of
> btrfs_init_devices_late to initialize it. That function already
> initializes fs_info of every individual device in btrfs_fs_devices.
>
> As far as clearing it is concerned it makes sense to move it to
> close_fs_devices. That function is only called when struct
> btrfs_fs_devices is no longer in use - either for holding seeds or main
> devices for a mounted filesystem.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

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