Skip to content

Commit be6b52c

Browse files
Tom Caputilundman
Tom Caputi
authored andcommitted
Fix for # 6916
When performing zil_claim() at pool import time, it is important that encrypted datasets set os_next_write_raw before writing to the zil_header_t. This prevents the code from attempting to re-authenticate the objset_phys_t when it writes it out, which is unnecessary because the zil_header_t is not protected by either objset MAC and impossible since the keys aren't loaded yet. Unfortunately, one of the code paths did not set this flag, which causes failed ASSERTs during 'zpool import -F'. This patch corrects this issue. Signed-off-by: Tom Caputi <[email protected]>
1 parent 940e474 commit be6b52c

File tree

1 file changed

+2
-0
lines changed
  • usr/src/uts/common/fs/zfs

1 file changed

+2
-0
lines changed

usr/src/uts/common/fs/zfs/zil.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ zil_claim(dsl_pool_t *dp, dsl_dataset_t *ds, void *txarg)
794794
if (zilog->zl_parse_lr_count || zilog->zl_parse_blk_count > 1)
795795
zh->zh_flags |= ZIL_REPLAY_NEEDED;
796796
zh->zh_flags |= ZIL_CLAIM_LR_SEQ_VALID;
797+
if (os->os_encrypted)
798+
os->os_next_write_raw = B_TRUE;
797799
dsl_dataset_dirty(dmu_objset_ds(os), tx);
798800
}
799801

0 commit comments

Comments
 (0)