From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart.VanAssche@wdc.com (Bart Van Assche) Date: Wed, 30 Aug 2017 16:56:28 +0000 Subject: [GIT PULL] nvme update for Linux 4.14, take 2 In-Reply-To: References: <20170829150507.rjixn6uf3id6kltx@infradead.org> <9a27048d-1252-985f-c905-b738d709b204@kernel.dk> <38ddd70f-3fec-09c0-dafb-eba1e8f9cc18@grimberg.me> <1504106914.2526.5.camel@wdc.com> <1504107991.2526.16.camel@wdc.com> <30e386a2-aac7-e9b7-59e2-52c481247e4e@kernel.dk> <0ca15e8f-fc04-7694-a471-379103c6428d@grimberg.me> <1504109513.2526.28.camel@wdc.com> Message-ID: <1504112187.2526.47.camel@wdc.com> On Wed, 2017-08-30@19:47 +0300, Sagi Grimberg wrote: > > > If we get to choose, my preference would be to restore the old behavior > > > because currently existing nvme transports keep their internal ctrl > > > representation in the tagset->driver_data as they implement > > > init/exit_request. Bouncing in nvme core would require to change that > > > and always keep struct nvme_ctrl as the tagset->driver_data and convert > > > it on every handler... > > > > > > Everything is doable but it seems like an unneeded hassle to me... > > > > Sorry but I'm not convinced that it would be necessary to change what > > tagset->driver_data points at. How about moving blk_mq_reinit_tagset() from > > the block layer core to the NVMe core, to rename it and to pass a pointer > > to the nvme_ctrl data structure to that function instead of only block layer > > information? > > That would mean that I need to open-code the tagset iteration in nvme > which does not feel like something a driver should do. How about renaming blk_mq_reinit_tagset() into blk_mq_tagset_iter() and to make the argument list of blk_mq_tagset_iter() more similar to that of blk_mq_queue_tag_busy_iter() such that callers of blk_mq_tagset_iter() can pass a pointer to any structure through the @priv argument? That would make this function more general and maybe also more useful to other block drivers. Bart.