From 478b3150dea216d73e3d65749c8d6ccd365efef4 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Wed, 21 Feb 2018 15:24:37 -0500 Subject: Add omitted set for os->os_next_write_raw This one line patch adds adds a set to os->os_next_write_raw that was omitted when the code was updated in 1b66810. Without it, the code (in some instances) could attempt to write raw encrypted data as regular unencrypted data without the keys being loaded, triggering an ASSERT in zio_encrypt(). Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #7196 --- module/zfs/dmu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/zfs/dmu.c') diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index cb86800f4..b7c5bba15 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -847,8 +847,11 @@ dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset, while (dr != NULL && dr->dr_txg > tx->tx_txg) dr = dr->dr_next; - if (dr != NULL && dr->dr_txg == tx->tx_txg) + if (dr != NULL && dr->dr_txg == tx->tx_txg) { dr->dt.dl.dr_raw = B_TRUE; + dn->dn_objset->os_next_write_raw + [tx->tx_txg & TXG_MASK] = B_TRUE; + } } dmu_tx_commit(tx); -- cgit v1.2.3