mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
zed additional features
This commit adds two features to zed, that macOS desires. The first is that when you unload the kernel module, zed would enter into a cpubusy loop calling zfs_events_next() repeatedly. We now look for ENODEV, returned by kernel, so zed can exit gracefully. Second feature is -I (idle) (alas -P persist was taken) is for the deamon to; 1; if started without ZFS kernel module, stick around waiting for it. 2; if kernel module is unloaded, go back to 1. This is due to daemons in macOS is started by launchctl, and is expected to stick around. Currently, the busy loop only exists when errno is ENODEV. This is to ensure that functionality that upstream expects is not changed. It did not care about errors before, and it still does not. (with the exception of ENODEV). However, it is probably better that all errors (ERESTART notwithstanding) exits the loop, and the issues complaining about zed taking all CPU will go away. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #10476
This commit is contained in:
+2
-2
@@ -17,13 +17,13 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void zed_event_init(struct zed_conf *zcp);
|
||||
int zed_event_init(struct zed_conf *zcp);
|
||||
|
||||
void zed_event_fini(struct zed_conf *zcp);
|
||||
|
||||
int zed_event_seek(struct zed_conf *zcp, uint64_t saved_eid,
|
||||
int64_t saved_etime[]);
|
||||
|
||||
void zed_event_service(struct zed_conf *zcp);
|
||||
int zed_event_service(struct zed_conf *zcp);
|
||||
|
||||
#endif /* !ZED_EVENT_H */
|
||||
|
||||
Reference in New Issue
Block a user