From: Qu Wenruo <wqu@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] block: Add new BLK_STS_SELFTEST status
Date: Sun, 7 Apr 2019 15:08:42 +0800 [thread overview]
Message-ID: <41acfcc7-1971-88a0-e34d-00fc34a5c190@suse.de> (raw)
In-Reply-To: <20190407070451.GA32498@infradead.org>
[-- Attachment #1.1: Type: text/plain, Size: 1001 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-04-07 7:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 10:37 [PATCH v2 1/2] block: Add new BLK_STS_SELFTEST status Qu Wenruo
2019-04-06 10:37 ` [PATCH v2 2/2] btrfs: Add error string for EUCLEAN Qu Wenruo
2019-04-07 7:04 ` [PATCH v2 1/2] block: Add new BLK_STS_SELFTEST status Christoph Hellwig
2019-04-07 7:08 ` Qu Wenruo [this message]
2019-04-08 6:32 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41acfcc7-1971-88a0-e34d-00fc34a5c190@suse.de \
--to=wqu@suse.de \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).