linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 1/2] ublk_drv: store device parameters
Date: Mon, 25 Jul 2022 15:06:50 +0800	[thread overview]
Message-ID: <Yt5BCtLi70Pits34@T590> (raw)
In-Reply-To: <20220725064259.GA20796@lst.de>

On Mon, Jul 25, 2022 at 08:42:59AM +0200, Christoph Hellwig wrote:
> On Sat, Jul 23, 2022 at 11:07:12PM +0800, Ming Lei wrote:
> > One important goal of ublk is to provide generic framework for
> > making one block device by userspace.
> > 
> > As one generic block device, there are still lots of parameters,
> > such as max_sectors, write_cache/fua, discard related limits,
> > zoned parameters, ...., so this patch starts to store & retrieve
> > device parameters and prepares for implementing ctrl command of
> > SET/GET_DEV_PARAMETERS.
> > 
> > Device parameters have to be stored somewhere, one reason is that
> > disk/queue won't be allocated until START_DEV command is received,
> > but device parameters have to setup before starting device.
> 
> This seems rather overeingeering and really hard to read.  Any reason
> to not simply open code the parameter verification and application
> and do away with the xarray and all the boiler plate code?
 
There could be more parameters than the two types(), such as segments,
zoned, ..., also in future, feature related parameters can be added
in this way too, and most of them are optional.

So xarray is needed.

Thanks,
Ming


  reply	other threads:[~2022-07-25  7:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 15:07 [PATCH 0/2] ublk_drv: add generic mechanism to get/set parameters Ming Lei
2022-07-23 15:07 ` [PATCH 1/2] ublk_drv: store device parameters Ming Lei
2022-07-25  6:42   ` Christoph Hellwig
2022-07-25  7:06     ` Ming Lei [this message]
2022-07-26 12:32       ` Christoph Hellwig
2022-07-26 14:21         ` Ming Lei
2022-07-26 17:47           ` Christoph Hellwig
2022-07-27  0:12             ` Ming Lei
2022-07-23 15:07 ` [PATCH 2/2] ublk_drv: add SET_PARA/GET_PARA control command Ming Lei
2022-07-25  6:45   ` Christoph Hellwig
2022-07-25  7:07     ` Ming Lei
2022-07-25  6:47 ` [PATCH 0/2] ublk_drv: add generic mechanism to get/set parameters Christoph Hellwig
2022-07-25  7:10   ` 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=Yt5BCtLi70Pits34@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).