Re: [PATCH v2] Btrfs: bring back repair during read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 24, 2017 at 03:04:50PM -0700, Liu Bo wrote:
> Commit 20a7db8ab3f2 ("btrfs: add dummy callback for readpage_io_failed
> and drop checks") made a cleanup around readpage_io_failed_hook, and
> it was supposed to keep the original sematics, but it also
> unexpectedly disabled repair during read for dup, raid1 and raid10.
> 
> This fixes the problem by letting data's inode call the generic
> readpage_io_failed callback by returning -EAGAIN from its
> readpage_io_failed_hook in order to notify end_bio_extent_readpage to
> do the rest.  We don't call it directly because the generic one takes
> an offset from end_bio_extent_readpage() to calculate the index in the
> checksum array and inode's readpage_io_failed_hook doesn't offer that
> offset.
> 
> Cc: David Sterba <dsterba@xxxxxxx>
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>

Thanks for catching it.

> -__attribute__((const))

The attribute could stay.

> -static int dummy_readpage_io_failed_hook(struct page *page, int failed_mirror)
> +static int btrfs_readpage_io_failed_hook(struct page *page, int failed_mirror)
>  {
> -	return 0;
> +	return -EAGAIN;
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux