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 <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7196
This commit is contained in:
Tom Caputi 2018-02-21 15:24:37 -05:00 committed by Brian Behlendorf
parent f2c0dee23b
commit 478b3150de

View File

@ -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);