From: Luis Chamberlain <mcgrof@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: axboe@kernel.dk, hch@lst.de, linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] block: make __register_blkdev() return an error
Date: Tue, 7 Sep 2021 08:28:06 -0700 [thread overview]
Message-ID: <YTeFButum63FZUTo@bombadil.infradead.org> (raw)
In-Reply-To: <1c795252-3bc8-1b6c-8a2b-3ef01fd73247@i-love.sakura.ne.jp>
On Wed, Sep 08, 2021 at 12:23:02AM +0900, Tetsuo Handa wrote:
> On 2021/09/07 23:57, Luis Chamberlain wrote:
> >> Actually, blk_request_module() failures should be ignored, for
> >> subsequent ilookup() will fail if blk_request_module() failed to
> >> create the requested block device.
> >
> > Then how about this:
> >
> > Since we would like to use __must_check for add_disk() we proceed with
> > the change to capture the errors and propagate them and we just document on
> > fs/block_dev.c's use of blk_request_module() about the above issue and
> > how we prefer the errror that ilookup() would return.
>
> Marking add_disk() as __must_check makes it possible to enforce "don't leave
> partially initialized devices". That's already an enough improvement.
>
> Probe functions can remain "void", and hence blk_request_module() can remain "void".
> That is, I would drop "[PATCH 1/2] block: make __register_blkdev() return an error".
Probe calls can be left voide, but because of the new __must_check we'd
still have to modify all probe calls as they use add_disk() and it would
seem odd to just capture the error to ignore it without documenting
any of this.
Luis
next prev parent reply other threads:[~2021-09-07 15:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-04 1:39 [PATCH 0/2] block: 7th -- last batch of add_disk() error handling conversions Luis Chamberlain
2021-09-04 1:39 ` [PATCH 1/2] block: make __register_blkdev() return an error Luis Chamberlain
2021-09-04 2:49 ` Tetsuo Handa
2021-09-04 4:14 ` Jens Axboe
2021-09-05 18:11 ` Luis Chamberlain
2021-09-06 5:59 ` Tetsuo Handa
2021-09-07 14:57 ` Luis Chamberlain
2021-09-07 15:23 ` Tetsuo Handa
2021-09-07 15:28 ` Luis Chamberlain [this message]
2021-09-08 14:00 ` Luis Chamberlain
2021-09-04 1:39 ` [PATCH 2/2] block: add __must_check for *add_disk*() callers Luis Chamberlain
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=YTeFButum63FZUTo@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.