sys/vfs/hammer: Properly set mirror_tid on root node split
[dragonfly.git] / sys / vfs / hammer / hammer_btree.c
index 49c5b48..aeb724f 100644 (file)
@@ -1586,6 +1586,7 @@ btree_split_internal(hammer_cursor_t cursor)
                ondisk->elms[0].base = hmp->root_btree_beg;
                ondisk->elms[0].base.btype = node->ondisk->type;
                ondisk->elms[0].internal.subtree_offset = node->node_offset;
+               ondisk->elms[0].internal.mirror_tid = ondisk->mirror_tid;
                ondisk->elms[1].base = hmp->root_btree_end;
                hammer_modify_node_done(parent);
                /* ondisk->elms[1].base.btype - not used */
@@ -1834,6 +1835,7 @@ btree_split_leaf(hammer_cursor_t cursor)
                ondisk->elms[0].base = hmp->root_btree_beg;
                ondisk->elms[0].base.btype = leaf->ondisk->type;
                ondisk->elms[0].internal.subtree_offset = leaf->node_offset;
+               ondisk->elms[0].internal.mirror_tid = ondisk->mirror_tid;
                ondisk->elms[1].base = hmp->root_btree_end;
                /* ondisk->elms[1].base.btype = not used */
                hammer_modify_node_done(parent);