From: Breno Leitao <leitao@debian.org>
To: Christoph Hellwig <hch@lst.de>
Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org,
asml.silence@gmail.com, axboe@kernel.dk, ming.lei@redhat.com,
leit@fb.com, linux-kernel@vger.kernel.org,
linux-block@vger.kernel.org, sagi@grimberg.me,
joshi.k@samsung.com, kbusch@kernel.org
Subject: Re: [PATCH v3 4/4] block: ublk_drv: Add a helper instead of casting
Date: Wed, 3 May 2023 12:11:40 -0700 [thread overview]
Message-ID: <ZFKx7Kn2Q3qiKfze@gmail.com> (raw)
In-Reply-To: <20230501043122.GC19673@lst.de>
On Mon, May 01, 2023 at 06:31:22AM +0200, Christoph Hellwig wrote:
> On Sun, Apr 30, 2023 at 07:35:32AM -0700, Breno Leitao wrote:
> > ublk driver is using casts to get private data from uring cmd struct.
> > Let's use a proper helper, as an interface that requires casts in all
> > callers is one asking for bugs.
> >
> > Suggested-by: Christoph Hellwig <hch@lst.de>
>
> No, I've not suggested this.
>
> > +static inline struct ublksrv_ctrl_cmd *ublk_uring_ctrl_cmd(
> > + struct io_uring_cmd *cmd)
> > +{
> > + return (struct ublksrv_ctrl_cmd *)cmd->sqe->cmd;
> > +}
>
> I've two times explained we need a core io_uring helper to remove this
> casting in the drivers, and I've explained how to do that and provided
> the actual code for it.
Sorry for it, somehow I misunderstood what you meant. I re-read the
thread and got what you said.
I am preparing a V4 with the new approach, and I will send it tomorrow.
prev parent reply other threads:[~2023-05-03 19:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-30 14:35 [PATCH v3 0/4] io_uring: Pass the whole sqe to commands Breno Leitao
2023-04-30 14:35 ` [PATCH v3 1/4] io_uring: Create a helper to return the SQE size Breno Leitao
2023-05-01 4:28 ` Christoph Hellwig
2023-04-30 14:35 ` [PATCH v3 2/4] io_uring: Pass whole sqe to commands Breno Leitao
2023-05-01 4:30 ` Christoph Hellwig
2023-04-30 14:35 ` [PATCH v3 3/4] io_uring: Remove unnecessary BUILD_BUG_ON Breno Leitao
2023-04-30 14:35 ` [PATCH v3 4/4] block: ublk_drv: Add a helper instead of casting Breno Leitao
2023-05-01 4:31 ` Christoph Hellwig
2023-05-03 19:11 ` Breno Leitao [this message]
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=ZFKx7Kn2Q3qiKfze@gmail.com \
--to=leitao@debian.org \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--cc=leit@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ming.lei@redhat.com \
--cc=sagi@grimberg.me \
/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.