mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47: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
+3
-6
@@ -1631,11 +1631,9 @@ zio_flush(zio_t *pio, vdev_t *vd)
|
||||
return;
|
||||
|
||||
if (vd->vdev_children == 0) {
|
||||
zio_t *zio = zio_create(pio, vd->vdev_spa, 0, NULL, NULL, 0, 0,
|
||||
zio_nowait(zio_create(pio, vd->vdev_spa, 0, NULL, NULL, 0, 0,
|
||||
NULL, NULL, ZIO_TYPE_IOCTL, ZIO_PRIORITY_NOW, flags, vd, 0,
|
||||
NULL, ZIO_STAGE_OPEN, ZIO_IOCTL_PIPELINE);
|
||||
zio->io_cmd = DKIOCFLUSHWRITECACHE;
|
||||
zio_nowait(zio);
|
||||
NULL, ZIO_STAGE_OPEN, ZIO_IOCTL_PIPELINE));
|
||||
} else {
|
||||
for (uint64_t c = 0; c < vd->vdev_children; c++)
|
||||
zio_flush(pio, vd->vdev_child[c]);
|
||||
@@ -4241,8 +4239,7 @@ zio_vdev_io_assess(zio_t *zio)
|
||||
* boolean flag so that we don't bother with it in the future.
|
||||
*/
|
||||
if ((zio->io_error == ENOTSUP || zio->io_error == ENOTTY) &&
|
||||
zio->io_type == ZIO_TYPE_IOCTL &&
|
||||
zio->io_cmd == DKIOCFLUSHWRITECACHE && vd != NULL)
|
||||
zio->io_type == ZIO_TYPE_IOCTL && vd != NULL)
|
||||
vd->vdev_nowritecache = B_TRUE;
|
||||
|
||||
if (zio->io_error)
|
||||
|
||||
Reference in New Issue
Block a user