mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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
This commit is contained in:
@@ -842,7 +842,7 @@ tests = ['recv_dedup', 'recv_dedup_encrypted_zvol', 'rsend_001_pos',
|
||||
'send-c_recv_lz4_disabled', 'send-c_mixed_compression',
|
||||
'send-c_stream_size_estimate', 'send-c_embedded_blocks', 'send-c_resume',
|
||||
'send-cpL_varied_recsize', 'send-c_recv_dedup', 'send-L_toggle',
|
||||
'send_encrypted_incremental.ksh',
|
||||
'send_encrypted_incremental.ksh', 'send_encrypted_freeobjects',
|
||||
'send_encrypted_hierarchy', 'send_encrypted_props',
|
||||
'send_encrypted_truncated_files', 'send_freeobjects', 'send_realloc_files',
|
||||
'send_realloc_encrypted_files', 'send_spill_block', 'send_holds',
|
||||
|
||||
@@ -550,6 +550,7 @@ tests = ['recv_dedup', 'recv_dedup_encrypted_zvol', 'rsend_001_pos',
|
||||
'rsend_014_pos', 'rsend_016_neg', 'send-c_verify_contents',
|
||||
'send-c_volume', 'send-c_zstreamdump', 'send-c_recv_dedup',
|
||||
'send-L_toggle', 'send_encrypted_hierarchy', 'send_encrypted_props',
|
||||
'send_encrypted_freeobjects',
|
||||
'send_encrypted_truncated_files', 'send_freeobjects', 'send_holds',
|
||||
'send_mixed_raw', 'send-wR_encrypted_zvol', 'send_partial_dataset',
|
||||
'send_invalid']
|
||||
|
||||
Reference in New Issue
Block a user