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

Function vdev_draid_spare_ioctl

freebsd/contrib/openzfs/module/zfs/vdev_draid.c:2713–2731  ·  view source on GitHub ↗

* Handle any ioctl requested of the distributed spare. Only flushes * are supported in which case all children must be flushed. */

Source from the content-addressed store, hash-verified

2711 * are supported in which case all children must be flushed.
2712 */
2713static int
2714vdev_draid_spare_ioctl(zio_t *zio)
2715{
2716 vdev_t *vd = zio->io_vd;
2717 int error = 0;
2718
2719 if (zio->io_cmd == DKIOCFLUSHWRITECACHE) {
2720 for (int c = 0; c < vd->vdev_children; c++) {
2721 zio_nowait(zio_vdev_child_io(zio, NULL,
2722 vd->vdev_child[c], zio->io_offset, zio->io_abd,
2723 zio->io_size, zio->io_type, zio->io_priority, 0,
2724 vdev_draid_spare_child_done, zio));
2725 }
2726 } else {
2727 error = SET_ERROR(ENOTSUP);
2728 }
2729
2730 return (error);
2731}
2732
2733/*
2734 * Initiate an IO to the distributed spare. For normal IOs this entails using

Callers 1

Calls 2

zio_nowaitFunction · 0.85
zio_vdev_child_ioFunction · 0.85

Tested by

no test coverage detected