From cd32e5db8bb4411533dc21cfc12a5af5f3b56701 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Mon, 18 Jun 2018 17:10:54 -0400 Subject: Add ASSERT to debug encryption key mapping issues This patch simply adds an ASSERT that confirms that the last decrypting reference on a dataset waits until the dataset is no longer dirty. This should help to debug issues where the ZIO layer cannot find encryption keys after a dataset has been disowned. Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #7637 --- include/sys/dmu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys/dmu.h') diff --git a/include/sys/dmu.h b/include/sys/dmu.h index e5950be93..44c026286 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -557,6 +557,7 @@ boolean_t dmu_buf_try_add_ref(dmu_buf_t *, objset_t *os, uint64_t object, void dmu_buf_rele(dmu_buf_t *db, void *tag); uint64_t dmu_buf_refcount(dmu_buf_t *db); +uint64_t dmu_buf_user_refcount(dmu_buf_t *db); /* * dmu_buf_hold_array holds the DMU buffers which contain all bytes in a -- cgit v1.2.3