zfs/module
David Hedberg 37a27b4306
Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
If we receive a DRR_FREEOBJECTS as the first entry in an object range,
this might end up producing a hole if the freed objects were the
only existing objects in the block.

If the txg starts syncing before we've processed any following
DRR_OBJECT records, this leads to a possible race where the backing
arc_buf_t gets its psize set to 0 in the arc_write_ready() callback
while still being referenced from a dirty record in the open txg.

To prevent this, we insert a txg_wait_synced call if the first
record in the range was a DRR_FREEOBJECTS that actually
resulted in one or more freed objects.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: David Hedberg <david.hedberg@findity.com>
Sponsored by: Findity AB
Closes #11893
Closes #14358
2023-01-23 13:19:43 -08:00
..
avl Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
icp Unify Assembler files between Linux and Windows 2023-01-17 11:09:19 -08:00
lua Unify Assembler files between Linux and Windows 2023-01-17 11:09:19 -08:00
nvpair Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
os Fix unprotected zfs_znode_dmu_fini 2023-01-19 16:59:05 -08:00
unicode Illumos #15286: do_composition() needs sign awareness 2023-01-05 11:16:21 -08:00
zcommon Configure zed's diagnosis engine with vdev properties 2023-01-23 13:14:25 -08:00
zfs Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole 2023-01-23 13:19:43 -08:00
zstd Cleanup of dead code suggested by Clang Static Analyzer (#14380) 2023-01-17 09:57:12 -08:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Unify Assembler files between Linux and Windows 2023-01-17 11:09:19 -08:00
Makefile.bsd Cleanup dead spa_boot code 2022-09-13 16:40:10 -07:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00