diff options
author | Tom Caputi <[email protected]> | 2018-02-01 15:37:24 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-02-02 11:44:53 -0800 |
commit | 1b66810bad0a893031c6d49613aa83dc359bf034 (patch) | |
tree | b79f06387969bd389aa8c8053ebf98562f0e2889 /module/zfs/dsl_crypt.c | |
parent | 047116ac76526d869e3f347afb5d81cc2b156fdf (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Closes #6864
Diffstat (limited to 'module/zfs/dsl_crypt.c')
-rw-r--r-- | module/zfs/dsl_crypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dsl_crypt.c b/module/zfs/dsl_crypt.c index cb13d2cdc..6a63d54ca 100644 --- a/module/zfs/dsl_crypt.c +++ b/module/zfs/dsl_crypt.c @@ -2177,7 +2177,7 @@ dsl_crypto_recv_key_sync(void *arg, dmu_tx_t *tx) 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; |