[systemd-devel] [PATCH 5/6] systemd: add Hashmap mount_unit_by_mnt_id

2020-07-26 Thread Ian Kent
From: Ian Kent When kernelwatch notification handling is added it will be necessary to find the Mount unit from the mount id to update individual Mount state. Add a Hashmap to lookup the Unit to get the Mount given a MountParameters mount id. Signed-off-by: Ian Kent --- src/core/mount.c | 6

[systemd-devel] [PATCH 4/6] systemd: add mount id to MountParameters

2020-07-26 Thread Ian Kent
From: Ian Kent When kernelwatch notification handling is added it will be necessary to find the Mount unit from the mount id to update individual Mount state, so add the mount id to MountParameters. Signed-off-by: Ian Kent --- src/core/mount.c | 29 + src/core/mou

[systemd-devel] [PATCH 3/6] systemd: try to use fsinfo for sigchld handling

2020-07-26 Thread Ian Kent
From: Ian Kent Try and use the new fsinfo() system call when handing SIGCHLD from systemd mount unit mounting. Signed-off-by: Ian Kent --- src/core/mount.c | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/core/mount.

[systemd-devel] [PATCH 6/6] systemd: use libmount kernelwatch if available

2020-07-26 Thread Ian Kent
From: Ian Kent Introduce an initial implementation that uses the new libmount kernelwatch notification method together with the fsinfo() system call. What I'm trying to do here is use kernelwatch notifications to create a set of mount units that have actually changed for the traversal that follo

[systemd-devel] [PATCH 2/6] systemd: refactor mount_process_proc_self_mountinfo()

2020-07-26 Thread Ian Kent
From: Ian Kent When libmount kernelwatch notifications are introduced it will be necessary to update mount unit state for individual units when so seperate out the state update. Signed-off-by: Ian Kent --- src/core/mount.c | 154 -- 1 file c

[systemd-devel] [PATCH 1/6] systemd: try to use libmount fsinfo if available

2020-07-26 Thread Ian Kent
From: Ian Kent Try and use the new fsinfo() system call when loading the mount table if possible. Signed-off-by: Ian Kent --- src/core/mount.c |6 -- src/mount/mount-tool.c |4 +++- src/shared/libmount-util.h | 28 src/shared/mount-util.

[systemd-devel] [PATCH 0/6] RFC: Initial implementation of mount table handling using libmount kernelwatch

2020-07-26 Thread Ian Kent
Further to my post about using the new mount table notifications in systemd I'd like to start by posting a few patches for discussion to hopefully get a better understanding of some aspects of how systemd mount unit state handling works, and also to get guidance on systemd coding style, and general

[systemd-devel] systemd.timer every X days?

2020-07-26 Thread Ian Pilcher
My NAS has 16 MD RAID devices. I've created a simple service (raidcheck@.service) that will trigger a check of the RAID device identified by the argument. E.g., 'systemctl start raidcheck@md1' will trigger the check of md1 (after checking that no other array is being checked/synced, no arrays ar