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

Martin Wilck mwilck at suse.com
Fri Mar 19 16:42:20 GMT 2021


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.

Regards
Martin





More information about the Linux-nvme mailing list