mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Change os->os_next_write_raw to work per txg
Currently, os_next_write_raw is a single boolean used for determining whether or not the next call to dmu_objset_sync() should write out the objset_phys_t as a raw buffer. Since the boolean is not associated with a txg, the work simply happens during the next txg, which is not necessarily the correct one. In the current implementation this issue was misdiagnosed, resulting in a small hack in dmu_objset_sync() which seemed to resolve the problem. This patch changes os_next_write_raw to be an array of booleans, one for each txg in TXG_OFF and removes the hack. Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #6864
This commit is contained in:
committed by
Brian Behlendorf
parent
047116ac76
commit
1b66810bad
@@ -1508,9 +1508,9 @@ dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx)
|
||||
* 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);
|
||||
|
||||
Reference in New Issue
Block a user