Skip to content

Mdmonitor refactor and udev event handling improvements

Mateusz Grzonka linux-raid 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 0 repliesNew
  2. v19 patches 14 repliesApplied

Changes in v2 from the cover letter

Fixed mismatched comment style and rebased onto master.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Mdmonitor: Make alert_info globalMonitor.c+61 -630 replies
2/8Mdmonitor: Pass events to alert() using enums instead of stringsMonitor.c+83 -530 replies
3/8Mdmonitor: Add helper functionsMonitor.c+158 -700 replies
4/8Add helpers to determine whether directories or files are soft linksmdadm.h util.c+47 -00 replies
5/8Mdmonitor: Refactor write_autorebuild_pid()Monitor.c+36 -190 replies
6/8Mdmonitor: Refactor check_one_sharer() for better error handlingMonitor.c+62 -270 replies
7/8Mdmonitor: Improve udev event handlingMakefile Manage.c Monitor.c +5 more+241 -1060 replies
8/8udev: Move udev_block() and udev_unblock() into udev.cCreate.c lib.c mdadm.h +3 more+53 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/8] Mdmonitor refactor and udev event handling improvements

Along the way we observed many problems with current approach to event handling in mdmonitor. It frequently doesn't report Fail and DeviceDisappeared events.
It's due to time races with udev, and too long delay in some cases.
While there was a patch intending to address time races with udev, it didn't remove them completely. This patch series presents alternative approach, where mdmonitor wakes up on udev events, so that there should be no more conflicts with udev we saw before.

Additionally some code quality improvements were done, to make the code more maintainable.

v2:
Fixed mismatched comment style and rebased onto master.

Mateusz Grzonka (8):
Mdmonitor: Make alert_info global
Mdmonitor: Pass events to alert() using enums instead of strings
Mdmonitor: Add helper functions
Add helpers to determine whether directories or files are soft links
Mdmonitor: Refactor write_autorebuild_pid()
Mdmonitor: Refactor check_one_sharer() for better error handling
Mdmonitor: Improve udev event handling
udev: Move udev_block() and udev_unblock() into udev.c

 Create.c  |   1 +
 Makefile  |   3 +-
 Manage.c  |   3 +-
 Monitor.c | 623 +++++++++++++++++++++++++++++++++---------------------
 lib.c     |  42 ----
 mdadm.h   |   5 +-
 mdopen.c  |  19 +-
 udev.c    | 191 +++++++++++++++++
 udev.h    |  38 ++++
 util.c    |  45 ++++
 10 files changed, 668 insertions(+), 302 deletions(-)
 create mode 100644 udev.c
 create mode 100644 udev.h
Signature · 1 line
2.26.2