* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
#include <sys/spa.h>
#include <sys/spa_impl.h>
#include <sys/vdev.h>
zio->io_type != ZIO_TYPE_WRITE)
return;
- /*
- * Ignore any errors from speculative I/Os, as failure is an
- * expected result.
- */
- if (zio->io_flags & ZIO_FLAG_SPECULATIVE)
- return;
-
- /*
- * If this I/O is not a retry I/O, don't post an ereport.
- * Otherwise, we risk making bad diagnoses based on B_FAILFAST
- * I/Os.
- */
- if (zio->io_error == EIO &&
- !(zio->io_flags & ZIO_FLAG_IO_RETRY))
- return;
-
if (vd != NULL) {
/*
* If the vdev has already been marked as failing due
fm_payload_set(ereport,
FM_EREPORT_PAYLOAD_ZFS_VDEV_FRU,
DATA_TYPE_STRING, vd->vdev_fru, NULL);
+ if (vd->vdev_ashift)
+ fm_payload_set(ereport,
+ FM_EREPORT_PAYLOAD_ZFS_VDEV_ASHIFT,
+ DATA_TYPE_UINT64, vd->vdev_ashift, NULL);
if (pvd != NULL) {
fm_payload_set(ereport,
*/
fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_ZIO_ERR,
DATA_TYPE_INT32, zio->io_error, NULL);
+ fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_ZIO_FLAGS,
+ DATA_TYPE_INT32, zio->io_flags, NULL);
+ fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_ZIO_STAGE,
+ DATA_TYPE_UINT32, zio->io_stage, NULL);
+ fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_ZIO_PIPELINE,
+ DATA_TYPE_UINT32, zio->io_pipeline, NULL);
+ fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_ZIO_DELAY,
+ DATA_TYPE_UINT64, zio->io_delay, NULL);
/*
* If the 'size' parameter is non-zero, it indicates this is a
size_t offset = 0;
ssize_t start = -1;
- zfs_ecksum_info_t *eip = kmem_zalloc(sizeof (*eip), KM_SLEEP);
+ zfs_ecksum_info_t *eip = kmem_zalloc(sizeof (*eip), KM_PUSHPAGE);
/* don't do any annotation for injected checksum errors */
if (info != NULL && info->zbc_injected)
struct zio *zio, uint64_t offset, uint64_t length, void *arg,
zio_bad_cksum_t *info)
{
- zio_cksum_report_t *report = kmem_zalloc(sizeof (*report), KM_SLEEP);
+ zio_cksum_report_t *report = kmem_zalloc(sizeof (*report), KM_PUSHPAGE);
if (zio->io_vsd != NULL)
zio->io_vsd_ops->vsd_cksum_report(zio, report, arg);
/* copy the checksum failure information if it was provided */
if (info != NULL) {
- report->zcr_ckinfo = kmem_zalloc(sizeof (*info), KM_SLEEP);
+ report->zcr_ckinfo = kmem_zalloc(sizeof (*info), KM_PUSHPAGE);
bcopy(info, report->zcr_ckinfo, sizeof (*info));
}
if (report->zcr_ereport == NULL) {
report->zcr_free(report->zcr_cbdata, report->zcr_cbinfo);
+ if (report->zcr_ckinfo != NULL) {
+ kmem_free(report->zcr_ckinfo,
+ sizeof (*report->zcr_ckinfo));
+ }
kmem_free(report, sizeof (*report));
return;
}