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