mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
zio: remove io_cmd and DKIOCFLUSHWRITECACHE
There's no other options, so we can just always assume its a flush. Includes some light refactoring where a switch statement was doing control flow that no longer works. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16064
This commit is contained in:
committed by
Brian Behlendorf
parent
cac416f106
commit
c9c838aa1f
@@ -2557,15 +2557,11 @@ vdev_draid_spare_ioctl(zio_t *zio)
|
||||
vdev_t *vd = zio->io_vd;
|
||||
int error = 0;
|
||||
|
||||
if (zio->io_cmd == DKIOCFLUSHWRITECACHE) {
|
||||
for (int c = 0; c < vd->vdev_children; c++) {
|
||||
zio_nowait(zio_vdev_child_io(zio, NULL,
|
||||
vd->vdev_child[c], zio->io_offset, zio->io_abd,
|
||||
zio->io_size, zio->io_type, zio->io_priority, 0,
|
||||
vdev_draid_spare_child_done, zio));
|
||||
}
|
||||
} else {
|
||||
error = SET_ERROR(ENOTSUP);
|
||||
for (int c = 0; c < vd->vdev_children; c++) {
|
||||
zio_nowait(zio_vdev_child_io(zio, NULL,
|
||||
vd->vdev_child[c], zio->io_offset, zio->io_abd,
|
||||
zio->io_size, zio->io_type, zio->io_priority, 0,
|
||||
vdev_draid_spare_child_done, zio));
|
||||
}
|
||||
|
||||
return (error);
|
||||
|
||||
Reference in New Issue
Block a user