1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
Define away spa_event_notify() in userspace - not necessary and breaks compilation in older Solaris builds.
Index: zfs+chaos4/lib/libzfscommon/include/sys/spa.h
===================================================================
--- zfs+chaos4.orig/lib/libzfscommon/include/sys/spa.h
+++ zfs+chaos4/lib/libzfscommon/include/sys/spa.h
@@ -516,7 +516,11 @@ extern int spa_prop_get(spa_t *spa, nvli
extern void spa_prop_clear_bootfs(spa_t *spa, uint64_t obj, dmu_tx_t *tx);
/* asynchronous event notification */
+#ifdef _KERNEL
extern void spa_event_notify(spa_t *spa, vdev_t *vdev, const char *name);
+#else
+#define spa_event_notify(s,v,n) ((void) 0)
+#endif
#ifdef ZFS_DEBUG
#define dprintf_bp(bp, fmt, ...) do { \
Index: zfs+chaos4/lib/libzpool/spa.c
===================================================================
--- zfs+chaos4.orig/lib/libzpool/spa.c
+++ zfs+chaos4/lib/libzpool/spa.c
@@ -4449,10 +4449,10 @@ spa_has_spare(spa_t *spa, uint64_t guid)
* in the userland libzpool, as we don't want consumers to misinterpret ztest
* or zdb as real changes.
*/
+#ifdef _KERNEL
void
spa_event_notify(spa_t *spa, vdev_t *vd, const char *name)
{
-#ifdef _KERNEL
sysevent_t *ev;
sysevent_attr_list_t *attr = NULL;
sysevent_value_t value;
@@ -4497,8 +4497,8 @@ done:
if (attr)
sysevent_free_attr(attr);
sysevent_free(ev);
-#endif
}
+#endif
void
spa_discard_io(spa_t *spa)
|