Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2010-04-29 13:15:31 -07:00
commit 7be23161bd
4 changed files with 3 additions and 15 deletions

View File

@ -58,6 +58,7 @@ extern "C" {
#include <atomic.h>
#include <dirent.h>
#include <time.h>
#include <libsysevent.h>
#include <sys/note.h>
#include <sys/types.h>
#include <sys/cred.h>
@ -71,11 +72,8 @@ extern "C" {
#include <sys/sdt.h>
#include <sys/kstat.h>
#include <sys/u8_textprep.h>
#ifdef HAVE_SYSEVENT
#include <libsysevent.h>
#include <sys/sysevent/eventdefs.h>
#include <sys/sysevent/dev.h>
#endif /* HAVE_SYSEVENT */
/*
* Stack

View File

@ -534,11 +534,7 @@ extern void spa_prop_clear_bootfs(spa_t *spa, uint64_t obj, dmu_tx_t *tx);
extern void spa_configfile_set(spa_t *, nvlist_t *, boolean_t);
/* asynchronous event notification */
#ifdef HAVE_SYSEVENT
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 { \

View File

@ -58,11 +58,9 @@ extern "C" {
#include <sys/zone.h>
#include <sys/uio.h>
#include <sys/zfs_debug.h>
#ifdef HAVE_SYSEVENT
#include <sys/sysevent.h>
#include <sys/sysevent/eventdefs.h>
#include <sys/sysevent/dev.h>
#endif /* HAVE_SYSEVENT */
#include <sys/fm/util.h>
#ifdef __cplusplus

View File

@ -3721,11 +3721,9 @@ spa_async_probe(spa_t *spa, vdev_t *vd)
static void
spa_async_autoexpand(spa_t *spa, vdev_t *vd)
{
#ifdef HAVE_SYSEVENT
sysevent_id_t eid;
nvlist_t *attr;
char *physpath;
#endif
int c;
if (!spa->spa_autoexpand)
@ -3739,7 +3737,6 @@ spa_async_autoexpand(spa_t *spa, vdev_t *vd)
if (!vd->vdev_ops->vdev_op_leaf || vd->vdev_physpath == NULL)
return;
#ifdef HAVE_SYSEVENT
physpath = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
(void) snprintf(physpath, MAXPATHLEN, "/devices%s", vd->vdev_physpath);
@ -3751,7 +3748,6 @@ spa_async_autoexpand(spa_t *spa, vdev_t *vd)
nvlist_free(attr);
kmem_free(physpath, MAXPATHLEN);
#endif
}
static void
@ -4521,10 +4517,10 @@ spa_has_active_shared_spare(spa_t *spa)
* in the userland libzpool, as we don't want consumers to misinterpret ztest
* or zdb as real changes.
*/
#ifdef HAVE_SYSEVENT
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;
@ -4569,8 +4565,8 @@ done:
if (attr)
sysevent_free_attr(attr);
sysevent_free(ev);
#endif
}
#endif /* HAVE_SYSEVENT */
#if defined(_KERNEL) && defined(HAVE_SPL)
/* state manipulation functions */