From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 1/5] nvme-core: Make nvme_init/uninit_ctrl setup/teardown symmetric
Date: Wed, 18 Oct 2017 14:17:13 -0600 [thread overview]
Message-ID: <20171018201713.GA1971@localhost.localdomain> (raw)
In-Reply-To: <4627b34e-449a-cd93-ac70-a628d558cac3@grimberg.me>
On Wed, Oct 18, 2017@06:29:40PM +0300, Sagi Grimberg wrote:
>
> > > From: Roy Shterman <roys at lightbitslabs.com>
> > >
> > > Its strange to have some of the cleanup for nvme_init_ctrl in
> > > nvme_free_ctrl. This cause us to have some magic ctrl refcount
> > > handling in controller initialization error paths.
> > >
> > > Make the init/uninit symmetric so we can have a sane and
> > > maintainable error sequences.
> >
> > It's not magic. It's just preventing name reuse when some management
> > code retains an open handle after the device was removed.
>
> management code as in nvme-cli?
>
> > Otherwise
> > you're going to get naming clashes when you bring up a new device with
> > the same name from reusing the still in-use instance.
>
> Can userspace keep an open-handle after device_destroy() was invoked?
>
> Can you explain how would I see naming clashes? I'm not sure I
> understand what you are referring to.
Hm, I'm not hitting duplicate name issues anymore. I can't be bothered
to bisect when that started working, but I think the dev_t lifetime
fixes has something to do with it.
Anyway, simpler is certainly preferred. This is looking okay so far,
and I'll try a few more things to see if I can break it.
next prev parent reply other threads:[~2017-10-18 20:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 11:07 [PATCH 0/5] Small rework of nvme_init/uninit_ctrl Sagi Grimberg
2017-10-18 11:07 ` [PATCH 1/5] nvme-core: Make nvme_init/uninit_ctrl setup/teardown symmetric Sagi Grimberg
2017-10-18 15:08 ` Keith Busch
2017-10-18 15:29 ` Sagi Grimberg
2017-10-18 16:21 ` Keith Busch
2017-10-18 20:17 ` Keith Busch [this message]
2017-10-19 15:19 ` Sagi Grimberg
2017-10-19 15:29 ` Christoph Hellwig
2017-10-19 15:31 ` Sagi Grimberg
2017-10-22 11:11 ` Sagi Grimberg
2017-10-23 14:31 ` Christoph Hellwig
2017-10-18 11:07 ` [PATCH 2/5] nvme-rdma: rework create_ctrl error flow Sagi Grimberg
2017-10-23 14:32 ` Christoph Hellwig
2017-10-23 15:25 ` Sagi Grimberg
2017-10-18 11:07 ` [PATCH 3/5] nvme-rdma: remove redundant check if the ctrl is in the ctrl when freeing it Sagi Grimberg
2017-10-18 11:07 ` [PATCH 4/5] nvme-loop: rework create_ctrl error flow Sagi Grimberg
2017-10-18 11:07 ` [PATCH 5/5] nvme-loop: remove redundant check if the ctrl is in the ctrl when freeing it Sagi Grimberg
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=20171018201713.GA1971@localhost.localdomain \
--to=keith.busch@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.