Tom Caputi edc1e713c2 Fix race in dnode_check_slots_free()
Currently, dnode_check_slots_free() works by checking dn->dn_type
in the dnode to determine if the dnode is reclaimable. However,
there is a small window of time between dnode_free_sync() in the
first call to dsl_dataset_sync() and when the useraccounting code
is run when the type is set DMU_OT_NONE, but the dnode is not yet
evictable, leading to crashes. This patch adds the ability for
dnodes to track which txg they were last dirtied in and adds a
check for this before performing the reclaim.

This patch also corrects several instances when dn_dirty_link was
treated as a list_node_t when it is technically a multilist_node_t.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7147 
Closes #7388
2018-04-10 11:15:05 -07:00
..
2018-04-10 11:15:05 -07:00
2017-09-19 12:17:29 -07:00
2018-03-15 10:56:55 -07:00
2017-08-15 17:26:38 -07:00
2017-08-09 15:31:08 -07:00
2018-02-13 14:54:54 -08:00
2013-09-04 15:49:00 -07:00
2018-02-13 14:54:54 -08:00
2017-08-14 10:36:48 -07:00