udev-node: skip stack directory creation for diskseq
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 6 Oct 2024 05:43:45 +0000 (14:43 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Oct 2024 00:56:26 +0000 (09:56 +0900)
commit09373c1a50297079e6b0447ea97af4e9a60f77fa
treed96ce733cb8dc977f0daf9a63d1736fc7f71a411
parentbba5f48acf72e21c647664fd00d8886122a7d5ba
udev-node: skip stack directory creation for diskseq

The disk/by-diskseq symlink should not be shared with multiple block
devices. Hence, it is not necessary to create stack directory for the
symlink that manages which device owns the symlink.

This is not just a optimization.
If a service unit tries to mount a disk image but the service fails, then
the diskseq of the loop device for the image may be continuously increased
during restart, and inodes in /run may increase rapidly, as the stack
directories are cleaned up only when udev queue is empty.

Fixes #34637.
src/udev/udev-node.c