Skip to content

Commit 48f33c1

Browse files
authored
DDT: Make children writes inherit allocator
Even though unlike gang children it is not so critical for dedup children to inherit parent's allocator, there is still no reason for them to have allocation policy different from normal writes. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rob Norris <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Closes #17961
1 parent 9a453b2 commit 48f33c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

module/zfs/zio.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,7 +3088,7 @@ zio_gang_issue(zio_t *zio)
30883088
}
30893089

30903090
static void
3091-
zio_gang_inherit_allocator(zio_t *pio, zio_t *cio)
3091+
zio_inherit_allocator(zio_t *pio, zio_t *cio)
30923092
{
30933093
cio->io_allocator = pio->io_allocator;
30943094
}
@@ -3223,7 +3223,7 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
32233223
zio_write_gang_done, NULL, pio->io_priority,
32243224
ZIO_GANG_CHILD_FLAGS(pio), &pio->io_bookmark);
32253225

3226-
zio_gang_inherit_allocator(pio, zio);
3226+
zio_inherit_allocator(pio, zio);
32273227
if (pio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
32283228
boolean_t more;
32293229
VERIFY(metaslab_class_throttle_reserve(mc, zio->io_allocator,
@@ -3285,7 +3285,7 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
32853285
(allocated ? ZIO_FLAG_PREALLOCATED : 0), &pio->io_bookmark);
32863286

32873287
resid -= psize;
3288-
zio_gang_inherit_allocator(zio, cio);
3288+
zio_inherit_allocator(zio, cio);
32893289
if (allocated) {
32903290
metaslab_trace_move(&cio_list, &cio->io_alloc_list);
32913291
metaslab_group_alloc_increment_all(spa,
@@ -4062,6 +4062,7 @@ zio_ddt_write(zio_t *zio)
40624062
zio_ddt_child_write_ready, NULL,
40634063
zio_ddt_child_write_done, dde, zio->io_priority,
40644064
ZIO_DDT_CHILD_FLAGS(zio), &zio->io_bookmark);
4065+
zio_inherit_allocator(zio, cio);
40654066

40664067
zio_push_transform(cio, zio->io_abd, zio->io_size, 0, NULL);
40674068

0 commit comments

Comments
 (0)