Lines Matching refs:fs
166 .start = tr->fs->min_block_num, in transaction_rebuild_free_set()
167 .end = tr->fs->dev->block_count, in transaction_rebuild_free_set()
184 list_add_tail(&tr->fs->allocated, &previously_allocated.node); in transaction_rebuild_free_set()
186 block_set_init(tr->fs, &tr->allocated); in transaction_rebuild_free_set()
187 list_add_tail(&tr->fs->allocated, &tr->allocated.node); in transaction_rebuild_free_set()
189 block_set_init(tr->fs, new_free_set); in transaction_rebuild_free_set()
341 assert(tr->fs); in transaction_complete_etc()
344 if (tr->fs->checkpoint_required) { in transaction_complete_etc()
345 tr->fs->checkpoint_required = false; in transaction_complete_etc()
346 if (!checkpoint_commit(tr->fs)) { in transaction_complete_etc()
351 tr->fs->checkpoint_required = true; in transaction_complete_etc()
360 block_mac_copy(tr, &new_checkpoint_mac, &tr->fs->checkpoint); in transaction_complete_etc()
390 transaction_merge_free_sets(tr, &new_free_set, &tr->fs->free, in transaction_complete_etc()
398 if (!transaction_check_free(tr, &new_free_set, tr->fs->reserved_count)) { in transaction_complete_etc()
406 if (tr->fs->alternate_data && tr->repaired) { in transaction_complete_etc()
416 block_set_print(tr, &tr->fs->free); in transaction_complete_etc()
454 if (block_mac_same_block(tr, &tr->fs->free.block_tree.root, in transaction_complete_etc()
460 assert(block_mac_eq(tr, &tr->fs->free.block_tree.root, in transaction_complete_etc()
462 assert(block_mac_eq(tr, &tr->fs->files.root, &new_files)); in transaction_complete_etc()
509 tr->fs->free.block_tree.root = new_free_set.block_tree.root; in transaction_complete_etc()
511 &tr->fs->free in transaction_complete_etc()
513 tr->fs->files.root = new_files; in transaction_complete_etc()
514 tr->fs->super_block_version = tr->fs->written_super_block_version; in transaction_complete_etc()
515 tr->fs->checkpoint = new_checkpoint_mac; in transaction_complete_etc()
517 assert(!tr->fs->alternate_data); in transaction_complete_etc()
518 tr->fs->main_repaired = true; in transaction_complete_etc()
521 tr->fs->checkpoint_free.block_tree.root = new_free_set.block_tree.root; in transaction_complete_etc()
522 block_range_clear(&tr->fs->checkpoint_free.initial_range); in transaction_complete_etc()
532 check_free_tree(tr, &tr->fs->free); in transaction_complete_etc()
534 list_for_every_entry_safe(&tr->fs->transactions, other_tr, tmp_tr, in transaction_complete_etc()
560 list_for_every_entry_safe(&tr->fs->transactions, other_tr, tmp_tr, in transaction_complete_etc()
596 assert(tr == tr->fs->initial_super_block_tr); in transaction_initial_super_block_complete()
605 __func__, tr->fs->written_super_block_version); in transaction_initial_super_block_complete()
606 write_current_super_block(tr->fs, true /* reinitialize */); in transaction_initial_super_block_complete()
610 tr->fs->super_block_version, tr->fs->written_super_block_version); in transaction_initial_super_block_complete()
612 assert(tr == tr->fs->initial_super_block_tr); in transaction_initial_super_block_complete()
613 tr->fs->super_block_version = tr->fs->written_super_block_version; in transaction_initial_super_block_complete()
614 tr->fs->initial_super_block_tr = NULL; in transaction_initial_super_block_complete()
627 assert(tr->fs); in transaction_activate()
640 block_set_init(tr->fs, &tr->tmp_allocated); in transaction_activate()
641 block_set_init(tr->fs, &tr->allocated); in transaction_activate()
642 block_set_init(tr->fs, &tr->freed); in transaction_activate()
644 fs_file_tree_init(tr->fs, &tr->files_added); in transaction_activate()
645 fs_file_tree_init(tr->fs, &tr->files_updated); in transaction_activate()
646 fs_file_tree_init(tr->fs, &tr->files_removed); in transaction_activate()
648 list_add_tail(&tr->fs->allocated, &tr->allocated.node); in transaction_activate()
649 list_add_tail(&tr->fs->allocated, &tr->tmp_allocated.node); in transaction_activate()
658 void transaction_init(struct transaction* tr, struct fs* fs, bool activate) { in transaction_init() argument
659 assert(fs); in transaction_init()
660 assert(fs->dev); in transaction_init()
663 tr->fs = fs; in transaction_init()
666 list_add_tail(&fs->transactions, &tr->node); in transaction_init()