1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmeventd: check for running dmeventd for status

Before initiation fifo communication, check whether there is
running dmeventd - in case there is no running instance, this
would be just blocked for 5 seconds trying to open fifo.
This commit is contained in:
Zdenek Kabelac 2024-04-08 19:44:39 +02:00
parent d8e52aed87
commit 092951f634
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.198 -
===================
Query with dmeventd -i quickly ends when there is no running dmeventd.
Enhance dm_get_status_raid to handle mismatching status or reported legs.
Create /dev/disk/by-label symlinks for DM devs that have crypto as next layer.
Persist udev db for DM devs on cleanup used in initrd to rootfs transition.

View File

@ -2080,6 +2080,11 @@ static int _info_dmeventd(const char *name, struct dm_event_fifos *fifos)
int version;
int ret = 0;
if (!dm_daemon_is_running(DMEVENTD_PIDFILE)) {
fprintf(stderr, "No running dmeventd instance for status query.\n");
return 0;
}
/* Get the list of registrations from the running daemon. */
if (!init_fifos(fifos)) {
fprintf(stderr, "Could not initiate communication with existing dmeventd.\n");