Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177852668
D61527.1795433570.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61527.1795433570.diff
View Options
diff --git a/sys/contrib/openzfs/module/zfs/dbuf.c b/sys/contrib/openzfs/module/zfs/dbuf.c
--- a/sys/contrib/openzfs/module/zfs/dbuf.c
+++ b/sys/contrib/openzfs/module/zfs/dbuf.c
@@ -1484,6 +1484,13 @@
* find frees from TXGs before the override, which should not make
* the block appear freed. Instead, check only free ranges from
* TXGs after the override.
+ *
+ * Otherwise, recheck BP_IS_HOLE() after dnode_block_freed():
+ * dnode_sync_free_ranges() clears the bp before it removes the
+ * free range, and free_blocks() does not take the parent's
+ * db_rwlock for blkptrs held in the dnode. If we wait for dn_mtx
+ * while that happens, block_freed says "no" but bp is now a hole,
+ * which must not be handed to arc_read().
*/
if (!is_hole && db->db_level == 0) {
dbuf_dirty_record_t *dr = list_head(&db->db_dirty_records);
@@ -1492,7 +1499,8 @@
is_hole = dnode_block_freed_after(dn,
db->db_blkid, dr->dr_txg);
} else {
- is_hole = dnode_block_freed(dn, db->db_blkid);
+ is_hole = dnode_block_freed(dn, db->db_blkid) ||
+ BP_IS_HOLE(bp);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 23, 11:32 AM (11 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41736798
Default Alt Text
D61527.1795433570.diff (1 KB)
Attached To
Mode
D61527: MFC: dbuf: restore BP_IS_HOLE() recheck after dnode_block_freed()
Attached
Detach File
Event Timeline