From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Subject: Re: [PATCH V3 3/5] ublk_drv: add SET_PARAM/GET_PARAM control command
Date: Fri, 29 Jul 2022 22:59:27 +0800 [thread overview]
Message-ID: <YuP1zz965Ljud/XA@T590> (raw)
In-Reply-To: <20220729142226.GC32321@lst.de>
On Fri, Jul 29, 2022 at 04:22:26PM +0200, Christoph Hellwig wrote:
> On Fri, Jul 29, 2022 at 03:29:52PM +0800, Ming Lei wrote:
> > The parameter passed from userspace is added to one array, and the type is
> > used as index of the array. The following patch will add two parameter
> > types: basic(covers basic queue setting and misc settings which can't be grouped
>
> A bunch of overly long lines here.
>
> But I still think this is the wrong design. The number of potential
> parameter is very limited, so splitting them over multiple ioctls
So far, at least the following 6 parameters are to be added:
- basic
- discard
- segment
- zoned
- user space crash recovery parameter
- userspace backing buffer parameter
And each one is basically not related with others.
And ublk is really one generic userspace driver framework, it is very
likely to have more parameters added in future.
> and data structure for no good reason is really a de-optimization
> that makes the code more complex and slower.
Fine, I don't have time to argue which one is better.
For the timing's reason, I switch to the single parameter way. If turns
outs single parameter can't work well enough in future, I will restart
to add set/get parameter command.
Thanks,
Ming
next prev parent reply other threads:[~2022-07-29 14:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 7:29 [PATCH V3 0/5] ublk_drv: add generic mechanism to get/set parameters Ming Lei
2022-07-29 7:29 ` [PATCH V3 1/5] ublk_drv: cancel device even though disk isn't up Ming Lei
2022-07-29 14:19 ` Christoph Hellwig
2022-07-29 7:29 ` [PATCH V3 2/5] ublk_drv: fix ublk device leak in case that add_disk fails Ming Lei
2022-07-29 14:20 ` Christoph Hellwig
2022-07-29 7:29 ` [PATCH V3 3/5] ublk_drv: add SET_PARAM/GET_PARAM control command Ming Lei
2022-07-29 14:22 ` Christoph Hellwig
2022-07-29 14:59 ` Ming Lei [this message]
2022-07-29 7:29 ` [PATCH V3 4/5] ublk_drv: add two parameter types Ming Lei
2022-07-29 14:23 ` Christoph Hellwig
2022-07-29 7:29 ` [PATCH V3 5/5] ublk_drv: cleanup ublksrv_ctrl_dev_info Ming Lei
2022-07-29 14:24 ` Christoph Hellwig
2022-07-29 15:02 ` Ming Lei
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=YuP1zz965Ljud/XA@T590 \
--to=ming.lei@redhat.com \
--cc=ZiyangZhang@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@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).