Skip to content

Commit 52e19d3

Browse files
committed
zio: rename ZIO_FLAG_IO_ALLOCATING to ZIO_FLAG_ALLOC_THROTTLED
Better describes what it means, and makes it look less like IO_IS_ALLOCATING, which means something different. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris <[email protected]>
1 parent dd54ec7 commit 52e19d3

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

include/sys/zio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ typedef uint64_t zio_flag_t;
196196
#define ZIO_FLAG_DONT_RETRY (1ULL << 10)
197197
#define ZIO_FLAG_NODATA (1ULL << 12)
198198
#define ZIO_FLAG_INDUCE_DAMAGE (1ULL << 13)
199-
#define ZIO_FLAG_IO_ALLOCATING (1ULL << 14)
199+
#define ZIO_FLAG_ALLOC_THROTTLED (1ULL << 14)
200200

201201
#define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1)
202202
#define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1)

man/man8/zpool-events.8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
2929
.\" Copyright (c) 2024, 2025, Klara, Inc.
3030
.\"
31-
.Dd May 27, 2025
31+
.Dd July 3, 2025
3232
.Dt ZPOOL-EVENTS 8
3333
.Os
3434
.
@@ -465,7 +465,7 @@ ZIO_FLAG_DONT_RETRY:0x00000400
465465
ZIO_FLAG_NODATA:0x00001000
466466
ZIO_FLAG_INDUCE_DAMAGE:0x00002000
467467

468-
ZIO_FLAG_IO_ALLOCATING:0x00004000
468+
ZIO_FLAG_ALLOC_THROTTLED:0x00004000
469469
ZIO_FLAG_IO_RETRY:0x00008000
470470
ZIO_FLAG_PROBE:0x00010000
471471
ZIO_FLAG_TRYHARD:0x00020000

module/zcommon/zfs_valstr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ _VALSTR_BITFIELD_IMPL(zio_flag,
203203
{ '?', "??", "[UNUSED 11]" },
204204
{ '.', "ND", "NODATA" },
205205
{ '.', "ID", "INDUCE_DAMAGE" },
206-
{ '.', "AL", "IO_ALLOCATING" },
206+
{ '.', "AT", "ALLOC_THROTTLED" },
207207
{ '.', "RE", "IO_RETRY" },
208208
{ '.', "PR", "PROBE" },
209209
{ '.', "TH", "TRYHARD" },

module/zfs/zio.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset,
16851685
* If this is a retried I/O then we ignore it since we will
16861686
* have already processed the original allocating I/O.
16871687
*/
1688-
if (flags & ZIO_FLAG_IO_ALLOCATING &&
1688+
if (flags & ZIO_FLAG_ALLOC_THROTTLED &&
16891689
(vd != vd->vdev_top || (flags & ZIO_FLAG_IO_RETRY))) {
16901690
ASSERT(pio->io_metaslab_class != NULL);
16911691
ASSERT(pio->io_metaslab_class->mc_alloc_throttle_enabled);
@@ -1695,7 +1695,7 @@ zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset,
16951695
ASSERT(!(pio->io_flags & ZIO_FLAG_IO_REWRITE) ||
16961696
pio->io_child_type == ZIO_CHILD_GANG);
16971697

1698-
flags &= ~ZIO_FLAG_IO_ALLOCATING;
1698+
flags &= ~ZIO_FLAG_ALLOC_THROTTLED;
16991699
}
17001700

17011701
zio = zio_create(pio, pio->io_spa, pio->io_txg, bp, data, size, size,
@@ -3157,7 +3157,7 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
31573157

31583158
ASSERT(ZIO_HAS_ALLOCATOR(pio));
31593159
int flags = METASLAB_GANG_HEADER;
3160-
if (pio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
3160+
if (pio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
31613161
ASSERT(pio->io_priority == ZIO_PRIORITY_ASYNC_WRITE);
31623162
ASSERT(has_data);
31633163

@@ -3192,11 +3192,11 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
31923192
ZIO_GANG_CHILD_FLAGS(pio), &pio->io_bookmark);
31933193

31943194
zio_gang_inherit_allocator(pio, zio);
3195-
if (pio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
3195+
if (pio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
31963196
boolean_t more;
31973197
VERIFY(metaslab_class_throttle_reserve(mc, zio->io_allocator,
31983198
gbh_copies, zio->io_size, B_TRUE, &more));
3199-
zio->io_flags |= ZIO_FLAG_IO_ALLOCATING;
3199+
zio->io_flags |= ZIO_FLAG_ALLOC_THROTTLED;
32003200
}
32013201

32023202
/*
@@ -4083,7 +4083,7 @@ zio_io_to_allocate(metaslab_class_allocator_t *mca, boolean_t *more)
40834083
B_FALSE, more)) {
40844084
return (NULL);
40854085
}
4086-
zio->io_flags |= ZIO_FLAG_IO_ALLOCATING;
4086+
zio->io_flags |= ZIO_FLAG_ALLOC_THROTTLED;
40874087

40884088
avl_remove(&mca->mca_tree, zio);
40894089
ASSERT3U(zio->io_stage, <, ZIO_STAGE_DVA_ALLOCATE);
@@ -4239,14 +4239,14 @@ zio_dva_allocate(zio_t *zio)
42394239
* If we are holding old class reservation, drop it.
42404240
* Dispatch the next ZIO(s) there if some are waiting.
42414241
*/
4242-
if (zio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
4242+
if (zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
42434243
if (metaslab_class_throttle_unreserve(mc,
42444244
zio->io_allocator, zio->io_prop.zp_copies,
42454245
zio->io_size)) {
42464246
zio_allocate_dispatch(zio->io_metaslab_class,
42474247
zio->io_allocator);
42484248
}
4249-
zio->io_flags &= ~ZIO_FLAG_IO_ALLOCATING;
4249+
zio->io_flags &= ~ZIO_FLAG_ALLOC_THROTTLED;
42504250
}
42514251

42524252
if (zfs_flags & ZFS_DEBUG_METASLAB_ALLOC) {
@@ -5206,7 +5206,7 @@ zio_ready(zio_t *zio)
52065206
if (zio->io_error != 0) {
52075207
zio->io_pipeline = ZIO_INTERLOCK_PIPELINE;
52085208

5209-
if (zio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
5209+
if (zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
52105210
ASSERT(IO_IS_ALLOCATING(zio));
52115211
ASSERT(zio->io_priority == ZIO_PRIORITY_ASYNC_WRITE);
52125212
ASSERT(zio->io_metaslab_class != NULL);
@@ -5277,7 +5277,7 @@ zio_dva_throttle_done(zio_t *zio)
52775277
ASSERT3P(vd, ==, vd->vdev_top);
52785278
ASSERT(zio_injection_enabled || !(zio->io_flags & ZIO_FLAG_IO_RETRY));
52795279
ASSERT(!(zio->io_flags & ZIO_FLAG_IO_REPAIR));
5280-
ASSERT(zio->io_flags & ZIO_FLAG_IO_ALLOCATING);
5280+
ASSERT(zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED);
52815281

52825282
/*
52835283
* Parents of gang children can have two flavors -- ones that allocated
@@ -5333,7 +5333,7 @@ zio_done(zio_t *zio)
53335333
* write. We must do this since the allocation is performed
53345334
* by the logical I/O but the actual write is done by child I/Os.
53355335
*/
5336-
if (zio->io_flags & ZIO_FLAG_IO_ALLOCATING &&
5336+
if (zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED &&
53375337
zio->io_child_type == ZIO_CHILD_VDEV)
53385338
zio_dva_throttle_done(zio);
53395339

0 commit comments

Comments
 (0)