MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zio_deadman_impl

Function zio_deadman_impl

freebsd/contrib/openzfs/module/zfs/zio.c:2008–2050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2006}
2007
2008static void
2009zio_deadman_impl(zio_t *pio, int ziodepth)
2010{
2011 zio_t *cio, *cio_next;
2012 zio_link_t *zl = NULL;
2013 vdev_t *vd = pio->io_vd;
2014
2015 if (zio_deadman_log_all || (vd != NULL && vd->vdev_ops->vdev_op_leaf)) {
2016 vdev_queue_t *vq = vd ? &vd->vdev_queue : NULL;
2017 zbookmark_phys_t *zb = &pio->io_bookmark;
2018 uint64_t delta = gethrtime() - pio->io_timestamp;
2019 uint64_t failmode = spa_get_deadman_failmode(pio->io_spa);
2020
2021 zfs_dbgmsg("slow zio[%d]: zio=%px timestamp=%llu "
2022 "delta=%llu queued=%llu io=%llu "
2023 "path=%s last=%llu "
2024 "type=%d priority=%d flags=0x%x "
2025 "stage=0x%x pipeline=0x%x pipeline-trace=0x%x "
2026 "objset=%llu object=%llu level=%llu blkid=%llu "
2027 "offset=%llu size=%llu error=%d",
2028 ziodepth, pio, pio->io_timestamp,
2029 delta, pio->io_delta, pio->io_delay,
2030 vd ? vd->vdev_path : "NULL", vq ? vq->vq_io_complete_ts : 0,
2031 pio->io_type, pio->io_priority, pio->io_flags,
2032 pio->io_stage, pio->io_pipeline, pio->io_pipeline_trace,
2033 zb->zb_objset, zb->zb_object, zb->zb_level, zb->zb_blkid,
2034 pio->io_offset, pio->io_size, pio->io_error);
2035 (void) zfs_ereport_post(FM_EREPORT_ZFS_DEADMAN,
2036 pio->io_spa, vd, zb, pio, 0);
2037
2038 if (failmode == ZIO_FAILURE_MODE_CONTINUE &&
2039 taskq_empty_ent(&pio->io_tqent)) {
2040 zio_interrupt(pio);
2041 }
2042 }
2043
2044 mutex_enter(&pio->io_lock);
2045 for (cio = zio_walk_children(pio, &zl); cio != NULL; cio = cio_next) {
2046 cio_next = zio_walk_children(pio, &zl);
2047 zio_deadman_impl(cio, ziodepth + 1);
2048 }
2049 mutex_exit(&pio->io_lock);
2050}
2051
2052/*
2053 * Log the critical information describing this zio and all of its children

Callers 1

zio_deadmanFunction · 0.85

Calls 9

spa_get_deadman_failmodeFunction · 0.85
zfs_ereport_postFunction · 0.85
zio_interruptFunction · 0.85
mutex_enterFunction · 0.85
zio_walk_childrenFunction · 0.85
mutex_exitFunction · 0.85
gethrtimeFunction · 0.50
zfs_dbgmsgClass · 0.50
taskq_empty_entFunction · 0.50

Tested by

no test coverage detected