Re: [PATCH 1/2] ublk_drv: store device parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux