]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: introduce /run/mount/utab.event
authorKarel Zak <kzak@redhat.com>
Wed, 3 Jan 2024 13:13:28 +0000 (14:13 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 3 Jan 2024 13:13:28 +0000 (14:13 +0100)
commit544824929a740ed5f8108c752872c7f082f301cf
tree2b69ae08b3afb612e9a6e9e8e9a4721c8cb3027a
parent0f9b2438c927d2787bf43b693809af3719e15646
libmount: introduce /run/mount/utab.event

The mnt_monitor_...() API uses /run/mount/utab.lock to monitor utab
changes. The same file is used to control access to the utab file.

The utab can be updated more than once during one mount(8) call, for
example, one update is done in /sbin/mount.nfs and next in mount(8).
This situation triggers two (e.g. inotify) events when monitoring is
based on the lock file.

It seems better to introduce separate file to trigger the event and do
not trigger this event in /sbin/mount.<type> helpers.

References: 477401f0de404aafbc7630f70c2f8b1d670e32f8
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c
libmount/src/monitor.c
libmount/src/mountP.h
libmount/src/tab_update.c