]> git.proxmox.com Git - mirror_zfs.git/commit
etc/systemd/zfs-mount-generator: rewrite in C
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Mon, 19 Apr 2021 18:56:10 +0000 (20:56 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 27 May 2021 15:45:51 +0000 (08:45 -0700)
commit5a1fb060fd6ccd8bf22a49028f3eb677d5978a94
tree8e7d4cb104ff692896267c723036a45a6a134ce8
parent0bb736ce0b59d6851dff0914a98a4ff90bba15b3
etc/systemd/zfs-mount-generator: rewrite in C

A plain rewrite of the shell version, and generates identical
units, save for replacing some empty lines with nothing, having fewer
meaningless spaces in After=s and different spacing in the lock scripts,
for a clean git diff -w

This is a gain of anywhere from 0m0.336s vs 0m0.022s (15.27x)
to 0m0.202s vs 0m0.006s (33.67x), depending on the hardware,
a.k.a. from "absolutely unusable" to "perfectly fine"

This also properly deals with canmount=noauto units across multiple
pools

See PR for detailed timings (of an early version) and diffs

Reviewed-by: Antonio Russo <aerusso@aerusso.net>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: InsanePrawn <insane.prawny@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Issue #11915
Closes #11917
Makefile.am
etc/systemd/system-generators/Makefile.am
etc/systemd/system-generators/zfs-mount-generator.c [new file with mode: 0644]
etc/systemd/system-generators/zfs-mount-generator.in [deleted file]
man/man8/zfs-mount-generator.8.in