Update linux-events
Minor updates to linux-events to handle some upstream changes. Luckily, this was done flexibly enough the first time it wasn't much of a problem.
This commit is contained in:
parent
f9e717f642
commit
3a0400ad88
|
@ -3431,7 +3431,7 @@ zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp)
|
||||||
int
|
int
|
||||||
zpool_events_next(libzfs_handle_t *hdl, nvlist_t **nvp, int *dropped, int block)
|
zpool_events_next(libzfs_handle_t *hdl, nvlist_t **nvp, int *dropped, int block)
|
||||||
{
|
{
|
||||||
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
|
zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
*nvp = NULL;
|
*nvp = NULL;
|
||||||
|
@ -3489,7 +3489,7 @@ out:
|
||||||
int
|
int
|
||||||
zpool_events_clear(libzfs_handle_t *hdl, int *count)
|
zpool_events_clear(libzfs_handle_t *hdl, int *count)
|
||||||
{
|
{
|
||||||
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
|
zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
|
||||||
char msg[1024];
|
char msg[1024];
|
||||||
|
|
||||||
(void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN,
|
(void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN,
|
||||||
|
|
|
@ -50,9 +50,7 @@
|
||||||
|
|
||||||
typedef int (scan_cb_t)(dsl_pool_t *, const blkptr_t *, const zbookmark_t *);
|
typedef int (scan_cb_t)(dsl_pool_t *, const blkptr_t *, const zbookmark_t *);
|
||||||
|
|
||||||
static scan_cb_t dsl_scan_defrag_cb;
|
|
||||||
static scan_cb_t dsl_scan_scrub_cb;
|
static scan_cb_t dsl_scan_scrub_cb;
|
||||||
static scan_cb_t dsl_scan_remove_cb;
|
|
||||||
static dsl_syncfunc_t dsl_scan_cancel_sync;
|
static dsl_syncfunc_t dsl_scan_cancel_sync;
|
||||||
static void dsl_scan_sync_state(dsl_scan_t *, dmu_tx_t *tx);
|
static void dsl_scan_sync_state(dsl_scan_t *, dmu_tx_t *tx);
|
||||||
|
|
||||||
|
@ -189,9 +187,9 @@ dsl_scan_setup_sync(void *arg1, void *arg2, dmu_tx_t *tx)
|
||||||
|
|
||||||
if (vdev_resilver_needed(spa->spa_root_vdev,
|
if (vdev_resilver_needed(spa->spa_root_vdev,
|
||||||
&scn->scn_phys.scn_min_txg, &scn->scn_phys.scn_max_txg)) {
|
&scn->scn_phys.scn_min_txg, &scn->scn_phys.scn_max_txg)) {
|
||||||
spa_event_notify(spa, NULL, ESC_ZFS_RESILVER_START);
|
spa_event_notify(spa, NULL, FM_EREPORT_ZFS_RESILVER_START);
|
||||||
} else {
|
} else {
|
||||||
spa_event_notify(spa, NULL, ESC_ZFS_SCRUB_START);
|
spa_event_notify(spa, NULL, FM_EREPORT_ZFS_SCRUB_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
spa->spa_scrub_started = B_TRUE;
|
spa->spa_scrub_started = B_TRUE;
|
||||||
|
@ -292,7 +290,8 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu_tx_t *tx)
|
||||||
complete ? scn->scn_phys.scn_max_txg : 0, B_TRUE);
|
complete ? scn->scn_phys.scn_max_txg : 0, B_TRUE);
|
||||||
if (complete) {
|
if (complete) {
|
||||||
spa_event_notify(spa, NULL, scn->scn_phys.scn_min_txg ?
|
spa_event_notify(spa, NULL, scn->scn_phys.scn_min_txg ?
|
||||||
ESC_ZFS_RESILVER_FINISH : ESC_ZFS_SCRUB_FINISH);
|
FM_EREPORT_ZFS_RESILVER_FINISH :
|
||||||
|
FM_EREPORT_ZFS_SCRUB_FINISH);
|
||||||
}
|
}
|
||||||
spa_errlog_rotate(spa);
|
spa_errlog_rotate(spa);
|
||||||
|
|
||||||
|
|
|
@ -432,7 +432,7 @@ static void
|
||||||
fm_event_free(zevent_t *ev)
|
fm_event_free(zevent_t *ev)
|
||||||
{
|
{
|
||||||
/* Run provided cleanup callback */
|
/* Run provided cleanup callback */
|
||||||
ev->ev_cb(ev->ev_nvl);
|
ev->ev_cb(ev->ev_nvl, ev->ev_detector);
|
||||||
|
|
||||||
list_destroy(&ev->ev_zpd_list);
|
list_destroy(&ev->ev_zpd_list);
|
||||||
kmem_free(ev, sizeof(zevent_t));
|
kmem_free(ev, sizeof(zevent_t));
|
||||||
|
|
|
@ -79,7 +79,7 @@ typedef struct erpt_dump {
|
||||||
|
|
||||||
#define ZEVENT_SHUTDOWN 0x1
|
#define ZEVENT_SHUTDOWN 0x1
|
||||||
|
|
||||||
typedef void zevent_cb_t(nvlist_t *);
|
typedef void zevent_cb_t(nvlist_t *, nvlist_t *);
|
||||||
|
|
||||||
typedef struct zevent_s {
|
typedef struct zevent_s {
|
||||||
nvlist_t *ev_nvl; /* protected by the zevent_lock */
|
nvlist_t *ev_nvl; /* protected by the zevent_lock */
|
||||||
|
@ -100,7 +100,7 @@ extern void fm_fini(void);
|
||||||
extern void fm_nvprint(nvlist_t *);
|
extern void fm_nvprint(nvlist_t *);
|
||||||
extern void fm_zevent_init(zfs_private_data_t *);
|
extern void fm_zevent_init(zfs_private_data_t *);
|
||||||
extern void fm_zevent_fini(zfs_private_data_t *);
|
extern void fm_zevent_fini(zfs_private_data_t *);
|
||||||
extern void fm_zevent_post(nvlist_t *, zevent_cb_t *);
|
extern void fm_zevent_post(nvlist_t *, nvlist_t *, zevent_cb_t *);
|
||||||
extern void fm_zevent_drain_all(int *);
|
extern void fm_zevent_drain_all(int *);
|
||||||
extern int fm_zevent_next(zfs_private_data_t *, zfs_cmd_t *);
|
extern int fm_zevent_next(zfs_private_data_t *, zfs_cmd_t *);
|
||||||
extern int fm_zevent_wait(zfs_private_data_t *);
|
extern int fm_zevent_wait(zfs_private_data_t *);
|
||||||
|
|
|
@ -4038,7 +4038,7 @@ spa_vdev_detach(spa_t *spa, uint64_t guid, uint64_t pguid, int replace_done)
|
||||||
vd->vdev_detached = B_TRUE;
|
vd->vdev_detached = B_TRUE;
|
||||||
vdev_dirty(tvd, VDD_DTL, vd, txg);
|
vdev_dirty(tvd, VDD_DTL, vd, txg);
|
||||||
|
|
||||||
spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE);
|
spa_event_notify(spa, vd, FM_EREPORT_ZFS_DEVICE_REMOVE);
|
||||||
|
|
||||||
error = spa_vdev_exit(spa, vd, txg, 0);
|
error = spa_vdev_exit(spa, vd, txg, 0);
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,6 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **detector_out,
|
||||||
vd != NULL ? vd->vdev_guid : 0);
|
vd != NULL ? vd->vdev_guid : 0);
|
||||||
|
|
||||||
fm_ereport_set(ereport, FM_EREPORT_VERSION, class, ena, detector, NULL);
|
fm_ereport_set(ereport, FM_EREPORT_VERSION, class, ena, detector, NULL);
|
||||||
fm_nvlist_destroy(detector, FM_NVA_FREE);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Construct the per-ereport payload, depending on which parameters are
|
* Construct the per-ereport payload, depending on which parameters are
|
||||||
|
@ -440,12 +439,13 @@ shrink_ranges(zfs_ecksum_info_t *eip)
|
||||||
uint32_t end = r[idx].zr_end;
|
uint32_t end = r[idx].zr_end;
|
||||||
|
|
||||||
while (idx < max - 1) {
|
while (idx < max - 1) {
|
||||||
|
uint32_t nstart, nend, gap;
|
||||||
|
|
||||||
idx++;
|
idx++;
|
||||||
|
nstart = r[idx].zr_start;
|
||||||
|
nend = r[idx].zr_end;
|
||||||
|
|
||||||
uint32_t nstart = r[idx].zr_start;
|
gap = nstart - end;
|
||||||
uint32_t nend = r[idx].zr_end;
|
|
||||||
|
|
||||||
uint32_t gap = nstart - end;
|
|
||||||
if (gap < new_allowed_gap) {
|
if (gap < new_allowed_gap) {
|
||||||
end = nend;
|
end = nend;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue