[PATCH v2 02/16] nvme-cli: add code for event and timeout handling
Martin Wilck
mwilck at suse.com
Wed Mar 17 00:32:01 GMT 2021
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.
Martin
More information about the Linux-nvme
mailing list