On 2019/4/7 下午3:04, Christoph Hellwig wrote:
>> + [BLK_STS_UCLEAN] = { -EUCLEAN, "structure needs cleaning" },
>
> The subject line doesn't mention this new error code. That being said
> while this sounds slightly less bad than the original name it still
> sounds weird..
>
> The various filesystems really use EFSCORRUPTED which is just mapped
> to EUCLEAN, so maybe this really should be
>
> [BLK_STS_FSCORRUPTED] =
> { -EUCLEAN, "file system corruption detected" },
>
> But then again I really wonder why you need to pass this information
> through a blk_status_t to start with. In general these kinds of error
> should be passed through file system specific errno fields.
>
For functions called in endio hook, we return blk_status_t.
Or for case like hook before submitting bio, we set bio->bi_status to
record it.
Yes, it's possible to restore such info into fs specific structure, but
why not reuse the bi_status we all use and love?
Thanks,
Qu
Attachment:
signature.asc
Description: OpenPGP digital signature
