[PATCH v2 02/16] nvme-cli: add code for event and timeout handling

Martin Wilck mwilck at suse.com
Tue Mar 30 23:06:16 BST 2021


On Fri, 2021-03-19 at 17:42 +0100, Martin Wilck wrote:
> On Wed, 2021-03-17 at 01:32 +0100, Martin Wilck wrote:
> > On Sat, 2021-03-06 at 01:36 +0100, mwilck at suse.com wrote:
> > > From: Martin Wilck <mwilck at suse.com>
> > > 
> > > For the nvme monitor functionality, an event handling mechanism
> > > will be necessary which deals with event timeouts. While there are
> > > standard
> > > solutions for this (e.g. libevent), these add unnecessary
> > > complexity
> > > and dependencies to nvme-cli.
> > > 
> > > Add a small, straighforward event and timeout handling code based
> > > on epoll and timerfd.
> > > 
> > > This code is identical to what I've pushed recently to
> > > https://github.com/mwilck/minivent, where I added a couple of unit
> > > tests to make sure the code is as robust as it needs to be.
> > 
> > FTR, I found a use-after-free condition in this code. It's will be
> > fixed in the next iteration of this patch set.
> 
> The fixed code is in the git repo mentioned above. I suppose that, in
> case that the general approach gets positive review, it would make
> sense to pull this in via git subtree or git submodule. Tell me your
> preferences.

I've resubmitted to https://github.com/linux-nvme/nvme-cli/pull/877 now
with the event code incorporated via "git subtree"
from https://github.com/mwilck/minivent. I need to flatten the subtree
merge in order to submit this here in patch form, but I'll
postpone that until I get some feedback on the v2 series.

Best Regards,
Martin





More information about the Linux-nvme mailing list