[lkml]   [2019]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] nvme-core: Fix subsystem instance mismatches
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

 \ /
  Last update: 2019-09-04 08:07    [W:0.048 / U:9.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site