Message ID | 20221005032257.80681-1-kch@nvidia.com (mailing list archive) |
---|---|
Headers | show |
Series | block: add and use init tagset helper | expand |
On Tue, Oct 04, 2022 at 08:22:36PM -0700, Chaitanya Kulkarni wrote: > Hi, > > Add and use the helper to initialize the common fields of the tag_set > such as blk_mq_ops, number of h/w queues, queue depth, command size, > numa_node, timeout, BLK_MQ_F_XXX flags, driver data. This initialization > is spread all over the block drivers. This avoids repetation of > inialization code of the tag set in current block drivers and any future > ones. > > P.S. I'm aware of the EXPORT_SYMBOL_GPL() checkpatch warn just to make > get some feedback to so I can remove the RFC tag. > *If* there were commonalities at init and these could be broken up into common groups, each having their own set of calls, then we simplify and can abstract these. I say this without doing a complete review of the removals, but if there really isn't much of commonalities I tend to agree with Bart that open coding this is better. Luis
On Fri, Oct 07, 2022 at 11:26:13AM -0700, Luis Chamberlain wrote: > *If* there were commonalities at init and these could be broken up into > common groups, each having their own set of calls, then we simplify and > can abstract these. I say this without doing a complete review of the > removals, but if there really isn't much of commonalities I tend to > agree with Bart that open coding this is better. The commonality is that there are various required or optional fields to fill out. I actually have a WIP series to make the tag_set dynamically allocated and refcounted to fix some long standing life time issues. That creates a new alloc helper that will take a few mandatory arguments and would heavily clash with this series.
On 10/10/22 00:55, Christoph Hellwig wrote: > On Fri, Oct 07, 2022 at 11:26:13AM -0700, Luis Chamberlain wrote: >> *If* there were commonalities at init and these could be broken up into >> common groups, each having their own set of calls, then we simplify and >> can abstract these. I say this without doing a complete review of the >> removals, but if there really isn't much of commonalities I tend to >> agree with Bart that open coding this is better. > > The commonality is that there are various required or optional > fields to fill out. I actually have a WIP series to make the tag_set > dynamically allocated and refcounted to fix some long standing life time > issues. That creates a new alloc helper that will take a few mandatory > arguments and would heavily clash with this series. I sent out a series based on the feedback I got on this RFC that complies to the work we have done so far, it does not add more than 5 args and remove the duplicate code in the tree, please have a look. -ck