From: Christoph Hellwig <hch@infradead.org>
To: Sergei Shtepa <sergei.shtepa@veeam.com>
Cc: Christoph Hellwig <hch@infradead.org>,
"snitzer@redhat.com" <snitzer@redhat.com>,
"agk@redhat.com" <agk@redhat.com>, "hare@suse.de" <hare@suse.de>,
"song@kernel.org" <song@kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"dm-devel@redhat.com" <dm-devel@redhat.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
Pavel Tide <Pavel.TIde@veeam.com>
Subject: Re: [PATCH v6 2/4] block: add blk_interposer
Date: Wed, 10 Mar 2021 10:04:40 +0000 [thread overview]
Message-ID: <20210310100440.GA736136@infradead.org> (raw)
In-Reply-To: <20210310045313.GA26929@veeam.com>
On Wed, Mar 10, 2021 at 07:53:13AM +0300, Sergei Shtepa wrote:
> > Please avoid the overly long line.
> >
> > > + int ret = 0;
> > > +
> > > + if (WARN_ON(!interposer))
> >
> > WARN_ON_ONCE?
>
> This function should be called quite rarely, and the absence of the interposer
> parameter indicates that the function is being used incorrectly.
> I would like to see this warning every time.
Yes. Most kernel code would in fact just remove the check entirely
and let the kernel crash to indicate this. Maybe that is an even
better option for such a grave API usage mistake.
> > > +struct bdev_interposer {
> > > + ip_submit_bio_t ip_submit_bio;
> > > + struct block_device *bdev;
> >
> > Do we need the ip_ prefix here? Also we probably don't really the
> > the typedef for the function pointer.
>
> Ok. Maybe submit_bio_hook would be better? or submit_bio_interposer.
Or interpose_bio?
next prev parent reply other threads:[~2021-03-10 10:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 12:30 [PATCH v6 0/4] block-layer interposer Sergei Shtepa
2021-03-03 12:30 ` [PATCH v6 1/4] block: add blk_mq_is_queue_frozen() Sergei Shtepa
2021-03-09 17:19 ` Christoph Hellwig
2021-03-03 12:30 ` [PATCH v6 2/4] block: add blk_interposer Sergei Shtepa
2021-03-09 17:27 ` Christoph Hellwig
2021-03-10 4:53 ` Sergei Shtepa
2021-03-10 10:04 ` Christoph Hellwig [this message]
2021-03-03 12:30 ` [PATCH v6 3/4] dm: introduce dm-interposer Sergei Shtepa
2021-03-03 12:30 ` [PATCH v6 4/4] dm: add DM_INTERPOSED_FLAG Sergei Shtepa
2021-03-09 17:35 ` Christoph Hellwig
2021-03-10 5:28 ` Sergei Shtepa
2021-03-10 12:34 ` Christoph Hellwig
2021-03-11 10:54 ` Sergei Shtepa
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=20210310100440.GA736136@infradead.org \
--to=hch@infradead.org \
--cc=Pavel.TIde@veeam.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
--cc=linux-api@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=sergei.shtepa@veeam.com \
--cc=snitzer@redhat.com \
--cc=song@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).