Files
mirror_zfs/module/zfs
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
..
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00
2023-01-10 13:39:22 -08:00
2022-10-20 11:57:15 -07:00
2022-10-29 13:05:11 -07:00
2023-01-04 17:29:54 -07:00
2023-01-12 16:00:23 -08:00
2023-01-04 17:29:54 -07:00
2023-01-20 11:01:41 -08:00
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00
2022-01-07 10:36:49 -08:00
2022-01-12 16:14:36 -08:00
2019-06-19 09:48:12 -07:00
2022-10-12 11:25:18 -07:00
2022-09-30 15:34:39 -07:00
2022-03-15 15:13:42 -07:00
2022-10-27 09:54:54 -07:00
2022-10-20 11:57:15 -07:00
2022-09-02 13:31:19 -07:00
2023-01-12 16:00:30 -08:00
2022-10-28 09:49:20 -07:00
2022-11-29 09:26:03 -08:00