boolean_t os_rescan_dnodes;
/* os_phys_buf should be written raw next txg */
- boolean_t os_next_write_raw;
+ boolean_t os_next_write_raw[TXG_SIZE];
/* Protected by os_obj_lock */
kmutex_t os_obj_lock;
ASSERT3P(dr, !=, NULL);
ASSERT3U(dr->dr_txg, ==, tx->tx_txg);
dr->dt.dl.dr_raw = B_TRUE;
+ db->db_objset->os_next_write_raw[tx->tx_txg & TXG_MASK] = B_TRUE;
}
#pragma weak dmu_buf_fill_done = dbuf_fill_done
* the os_phys_buf raw. Neither of these actions will effect the MAC
* at this point.
*/
- if (arc_is_unauthenticated(os->os_phys_buf) || os->os_next_write_raw) {
+ if (os->os_next_write_raw[tx->tx_txg & TXG_MASK]) {
ASSERT(os->os_encrypted);
- os->os_next_write_raw = B_FALSE;
+ os->os_next_write_raw[tx->tx_txg & TXG_MASK] = B_FALSE;
arc_convert_to_raw(os->os_phys_buf,
os->os_dsl_dataset->ds_object, ZFS_HOST_BYTEORDER,
DMU_OT_OBJSET, NULL, NULL, NULL);
arc_release(os->os_phys_buf, &os->os_phys_buf);
bcopy(portable_mac, os->os_phys->os_portable_mac, ZIO_OBJSET_MAC_LEN);
bzero(os->os_phys->os_local_mac, ZIO_OBJSET_MAC_LEN);
- os->os_next_write_raw = B_TRUE;
+ os->os_next_write_raw[tx->tx_txg & TXG_MASK] = B_TRUE;
/* set metadnode compression and checksum */
mdn->dn_compress = compress;
bzero(&os->os_zil_header, sizeof (os->os_zil_header));
if (os->os_encrypted)
- os->os_next_write_raw = B_TRUE;
+ os->os_next_write_raw[tx->tx_txg & TXG_MASK] = B_TRUE;
zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
dsl_dataset_sync(ds, zio, tx);
zio_free_zil(zilog->zl_spa, first_txg, &zh->zh_log);
BP_ZERO(&zh->zh_log);
if (os->os_encrypted)
- os->os_next_write_raw = B_TRUE;
+ os->os_next_write_raw[tx->tx_txg & TXG_MASK] = B_TRUE;
dsl_dataset_dirty(dmu_objset_ds(os), tx);
dmu_objset_disown(os, B_FALSE, FTAG);
return (0);
zh->zh_flags |= ZIL_REPLAY_NEEDED;
zh->zh_flags |= ZIL_CLAIM_LR_SEQ_VALID;
if (os->os_encrypted)
- os->os_next_write_raw = B_TRUE;
+ os->os_next_write_raw[tx->tx_txg & TXG_MASK] = B_TRUE;
dsl_dataset_dirty(dmu_objset_ds(os), tx);
}