Re: [PATCH] Btrfs: skip checksum verification if IO error occurs

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

 



On Thu, Apr 13, 2017 at 06:11:48PM -0700, Liu Bo wrote:
> Currently dio read also goes to verify checksum if -EIO has been returned,
> although it usually fails on checksum, it's not necessary at all, we could
> directly check if there is another copy to read.
> 
> And with this, the behavior of dio read is now consistent with that of
> buffered read.
> 
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>

> @@ -8030,6 +8030,7 @@ static int __btrfs_subio_endio_read(struct inode *inode,
>  	unsigned int pgoff;
>  	int csum_pos;
>  	int i;
> +	int uptodate = !!(err == 0);

I've switched that to bool and dropped !!.
--
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