zpcimon: Monitor for hotplug of NVMes to trigger SMART collection

Use libudev to monitor for "change" events in the "nvme" subsystem that
use the "pcie" transport to trigger NVMe SMART data collection. Only
collect data from the NVMe referenced by the udev event.

Assisted-by: IBM Bob:1.0.1
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Niklas Schnelle
2026-04-23 14:20:47 +02:00
committed by Jan Höppner
parent f1a11a01df
commit 4fd607ae5c
4 changed files with 135 additions and 2 deletions
+6 -1
View File
@@ -7,7 +7,12 @@
#ifndef ZPCIMON_NVMEMON_H
#define ZPCIMON_NVMEMON_H
struct nvmemon_ctx {};
#include <libudev.h>
struct nvmemon_ctx {
struct udev *udev;
struct udev_monitor *mon;
};
extern const struct zpcimon_ops nvmemon_ops;
#endif /* ZPCIMON_NVMEMON_H */