Re: [PATCH 2/2] btrfs: return error if we're unable to read device stats

Anand Jain
2020-09-21T23:55:07Z

On 19/9/20 4:44 am, Josef Bacik wrote:
> I noticed when fixing device stats for seed devices that we simply threw
> away the return value from btrfs_search_slot(). This is because we may
> not have stat items, but we could very well get an error, and thus miss
> reporting the error up the chain. Fix this by returning ret if it's an
> actual error, and then stop trying to init the rest of the devices stats
> and return the error up the chain.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

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