Re: [PATCH v2] btrfs: factor our read/write stage off csum_tree_block() into its callers

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

 



On 19/02/2019 13:00, Nikolay Borisov wrote:
>> -	return csum_tree_block(fs_info, eb, 0);
>> +	ret = csum_tree_block(eb, result);
>> +	if (WARN_ON(ret))
>> +		return ret;
> 
> You are not handling the case where csum-tree_block returns a positive
> number. It should be translated to a negative value.

Correct, my bad.

But then regarding -EINVAL vs. -EUNCLEAN. In btree_csum_one_bio() the
return of csum_dirty_buffer() gets fed into errno_to_blk_status(), which
translates the errno into the block layer's blk_status_t values. As
neither EINVAL nor EUCLEAN are in the translation list, both would just
be translated to the default BLK_STS_IOERR which is the equivalent of EIO.

-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



[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