diff options
| author | Alexander Motin <alexander.motin@TrueNAS.com> | 2026-07-15 18:02:32 +0000 |
|---|---|---|
| committer | Tony Hutter <hutter2@llnl.gov> | 2026-08-13 16:40:04 +0000 |
| commit | a6f557c2cb58499dc3e09f5b91b1b3e4aa9b0c4f (patch) | |
| tree | 031bff6ca111dc95ee325aee56f32d878bf5a2e4 /include/sys/dnode.h | |
| parent | d6bbb80aedda2482950585a10e70cbd9d9d92482 (diff) | |
Fix reads for blocks freed after being cloned
PR #18421 fixed a case when reads for blocks cloned after being
freed could return zeroes. But it created an opposite problem,
when reads for blocks freed after being cloned could return non-
zero content from the cloning.
This patch fixes the problem by creating a more specialized
form of dnode_block_freed(), taking into account the TXG when
the cloning has happened and checking frees only in TXGs after.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Gary Guo <gary@kernel.org>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18421
Closes #18724
Diffstat (limited to 'include/sys/dnode.h')
| -rw-r--r-- | include/sys/dnode.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sys/dnode.h b/include/sys/dnode.h index b9ded73efe33..78dd0dc4f37b 100644 --- a/include/sys/dnode.h +++ b/include/sys/dnode.h @@ -449,6 +449,8 @@ void dnode_diduse_space(dnode_t *dn, int64_t space); void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx, boolean_t have_read, boolean_t force); uint64_t dnode_block_freed(dnode_t *dn, uint64_t blkid); +uint64_t dnode_block_freed_after(dnode_t *dn, uint64_t blkid, + uint64_t override_txg); void dnode_init(void); void dnode_fini(void); int dnode_next_offset(dnode_t *dn, int flags, uint64_t *off, |
