mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
zio: rename ZIO_TYPE_IOCTL to ZIO_TYPE_FLUSH
The only possible ioctl is a flush, and any other kind of meta-operation introduced in the future is likely to have different semantics (much like trim did). So, lets just call it what it is. 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
b613709c46
commit
d7605ae77b
@@ -247,7 +247,7 @@ vdev_file_io_start(zio_t *zio)
|
||||
vdev_t *vd = zio->io_vd;
|
||||
vdev_file_t *vf = vd->vdev_tsd;
|
||||
|
||||
if (zio->io_type == ZIO_TYPE_IOCTL) {
|
||||
if (zio->io_type == ZIO_TYPE_FLUSH) {
|
||||
/* XXPOLICY */
|
||||
if (!vdev_readable(vd)) {
|
||||
zio->io_error = SET_ERROR(ENXIO);
|
||||
|
||||
@@ -1053,7 +1053,7 @@ vdev_geom_io_intr(struct bio *bp)
|
||||
/*
|
||||
* We have to split bio freeing into two parts, because the ABD code
|
||||
* cannot be called in this context and vdev_op_io_done is not called
|
||||
* for ZIO_TYPE_IOCTL zio-s.
|
||||
* for ZIO_TYPE_FLUSH zio-s.
|
||||
*/
|
||||
if (zio->io_type != ZIO_TYPE_READ && zio->io_type != ZIO_TYPE_WRITE) {
|
||||
g_destroy_bio(bp);
|
||||
@@ -1153,7 +1153,7 @@ vdev_geom_io_start(zio_t *zio)
|
||||
|
||||
vd = zio->io_vd;
|
||||
|
||||
if (zio->io_type == ZIO_TYPE_IOCTL) {
|
||||
if (zio->io_type == ZIO_TYPE_FLUSH) {
|
||||
/* XXPOLICY */
|
||||
if (!vdev_readable(vd)) {
|
||||
zio->io_error = SET_ERROR(ENXIO);
|
||||
@@ -1181,7 +1181,7 @@ vdev_geom_io_start(zio_t *zio)
|
||||
ASSERT(zio->io_type == ZIO_TYPE_READ ||
|
||||
zio->io_type == ZIO_TYPE_WRITE ||
|
||||
zio->io_type == ZIO_TYPE_TRIM ||
|
||||
zio->io_type == ZIO_TYPE_IOCTL);
|
||||
zio->io_type == ZIO_TYPE_FLUSH);
|
||||
|
||||
cp = vd->vdev_tsd;
|
||||
if (cp == NULL) {
|
||||
@@ -1233,7 +1233,7 @@ vdev_geom_io_start(zio_t *zio)
|
||||
bp->bio_offset = zio->io_offset;
|
||||
bp->bio_length = zio->io_size;
|
||||
break;
|
||||
case ZIO_TYPE_IOCTL:
|
||||
case ZIO_TYPE_FLUSH:
|
||||
bp->bio_cmd = BIO_FLUSH;
|
||||
bp->bio_data = NULL;
|
||||
bp->bio_offset = cp->provider->mediasize;
|
||||
|
||||
@@ -1400,7 +1400,7 @@ vdev_disk_io_start(zio_t *zio)
|
||||
}
|
||||
|
||||
switch (zio->io_type) {
|
||||
case ZIO_TYPE_IOCTL:
|
||||
case ZIO_TYPE_FLUSH:
|
||||
|
||||
if (!vdev_readable(v)) {
|
||||
/* Drive not there, can't flush */
|
||||
|
||||
@@ -242,7 +242,7 @@ vdev_file_io_start(zio_t *zio)
|
||||
vdev_t *vd = zio->io_vd;
|
||||
vdev_file_t *vf = vd->vdev_tsd;
|
||||
|
||||
if (zio->io_type == ZIO_TYPE_IOCTL) {
|
||||
if (zio->io_type == ZIO_TYPE_FLUSH) {
|
||||
/* XXPOLICY */
|
||||
if (!vdev_readable(vd)) {
|
||||
zio->io_error = SET_ERROR(ENXIO);
|
||||
|
||||
Reference in New Issue
Block a user