From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Logan Gunthorpe <logang@deltatee.com>,
Keith Busch <keith.busch@intel.com>,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Jens Axboe <axboe@fb.com>, Hannes Reinecke <hare@suse.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH] nvme-core: Fix subsystem instance mismatches
Date: Wed, 4 Sep 2019 08:05:58 +0200 [thread overview]
Message-ID: <20190904060558.GA10849@lst.de> (raw)
In-Reply-To: <20190903164620.GA20847@localhost.localdomain>
On Tue, Sep 03, 2019 at 10:46:20AM -0600, Keith Busch wrote:
> Could we possibly make /dev/nvmeX be a subsystem handle without causing
> trouble for anyone? This would essentially be the same thing as today
> for non-CMIC controllers with a device-per-controller and only affects
> the CMIC ones.
A per-subsyste character device doesn't make sense, as a lot of admin
command require a specific controller.
If this really is an isue for people we'll just need to refcount the
handle allocation. That is:
- nvme_init_ctrl allocates a new nvme_instance or so object, which
does the ida_simple_get.
- we allocate a new subsystem that reuses the handle and grabs
a reference in nvme_init_subsystem, then if we find an existing
subsystem we drop that reference again.
- last free of a ctrl or subsystem also drops a reference, with
the final free releasing the ida
next prev parent reply other threads:[~2019-09-04 6:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-31 0:01 [PATCH] nvme-core: Fix subsystem instance mismatches Logan Gunthorpe
2019-08-31 15:29 ` Keith Busch
2019-09-03 16:08 ` Logan Gunthorpe
2019-09-03 16:46 ` Keith Busch
2019-09-03 18:13 ` Logan Gunthorpe
2019-09-04 6:05 ` Christoph Hellwig [this message]
2019-09-04 14:44 ` Keith Busch
2019-09-04 15:42 ` Christoph Hellwig
2019-09-04 15:54 ` Keith Busch
2019-09-04 16:02 ` Christoph Hellwig
2019-09-04 16:07 ` Logan Gunthorpe
2019-09-04 16:35 ` Keith Busch
2019-09-04 17:01 ` Logan Gunthorpe
2019-09-04 17:14 ` Keith Busch
2019-09-04 17:29 ` Logan Gunthorpe
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=20190904060558.GA10849@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=hare@suse.com \
--cc=kbusch@kernel.org \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=logang@deltatee.com \
--cc=martin.petersen@oracle.com \
--cc=sagi@grimberg.me \
/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