Lines Matching refs:trans
94 static int btrfs_log_inode(struct btrfs_trans_handle *trans,
100 static int link_to_fixup_dir(struct btrfs_trans_handle *trans,
103 static noinline int replay_dir_deletes(struct btrfs_trans_handle *trans,
137 static int start_log_trans(struct btrfs_trans_handle *trans, in start_log_trans() argument
147 if (btrfs_need_log_full_commit(trans)) { in start_log_trans()
161 ret = btrfs_init_log_root_tree(trans, fs_info); in start_log_trans()
166 ret = btrfs_add_log_tree(trans, root); in start_log_trans()
286 struct btrfs_trans_handle *trans; member
346 static noinline int overwrite_item(struct btrfs_trans_handle *trans, in overwrite_item() argument
462 ret = btrfs_insert_empty_item(trans, root, path, in overwrite_item()
544 trans->transid); in overwrite_item()
584 static noinline int replay_one_extent(struct btrfs_trans_handle *trans, in replay_one_extent() argument
635 ret = btrfs_lookup_file_extent(trans, root, path, in replay_one_extent()
667 ret = btrfs_drop_extents(trans, root, inode, start, extent_end, 1); in replay_one_extent()
681 ret = btrfs_insert_empty_item(trans, root, path, key, in replay_one_extent()
703 ret = btrfs_qgroup_trace_extent(trans, in replay_one_extent()
731 ret = btrfs_inc_extent_ref(trans, &ref); in replay_one_extent()
739 ret = btrfs_alloc_logged_file_extent(trans, in replay_one_extent()
817 ret = btrfs_del_csums(trans, in replay_one_extent()
822 ret = btrfs_csum_file_blocks(trans, in replay_one_extent()
834 ret = overwrite_item(trans, root, path, eb, slot, key); in replay_one_extent()
841 ret = btrfs_update_inode(trans, root, inode); in replay_one_extent()
856 static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, in drop_one_dir_item() argument
886 ret = link_to_fixup_dir(trans, root, path, location.objectid); in drop_one_dir_item()
890 ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, in drop_one_dir_item()
895 ret = btrfs_run_delayed_items(trans); in drop_one_dir_item()
1012 static inline int __add_inode_ref(struct btrfs_trans_handle *trans, in __add_inode_ref() argument
1074 ret = btrfs_unlink_inode(trans, root, dir, inode, in __add_inode_ref()
1079 ret = btrfs_run_delayed_items(trans); in __add_inode_ref()
1145 ret = btrfs_unlink_inode(trans, root, in __add_inode_ref()
1152 trans); in __add_inode_ref()
1170 di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(dir), in __add_inode_ref()
1175 ret = drop_one_dir_item(trans, root, path, dir, di); in __add_inode_ref()
1182 di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(dir), in __add_inode_ref()
1187 ret = drop_one_dir_item(trans, root, path, dir, di); in __add_inode_ref()
1247 static int unlink_old_inode_refs(struct btrfs_trans_handle *trans, in unlink_old_inode_refs() argument
1307 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in unlink_old_inode_refs()
1319 ret = btrfs_run_delayed_items(trans); in unlink_old_inode_refs()
1377 static int add_link(struct btrfs_trans_handle *trans, struct btrfs_root *root, in add_link() argument
1414 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), BTRFS_I(other_inode), in add_link()
1425 ret = btrfs_run_delayed_items(trans); in add_link()
1429 ret = btrfs_add_link(trans, BTRFS_I(dir), BTRFS_I(inode), in add_link()
1444 static noinline int add_inode_ref(struct btrfs_trans_handle *trans, in add_inode_ref() argument
1535 ret = __add_inode_ref(trans, root, path, log, in add_inode_ref()
1560 ret = btrfs_unlink_inode(trans, root, in add_inode_ref()
1579 ret = btrfs_run_delayed_items(trans); in add_inode_ref()
1585 ret = add_link(trans, root, dir, inode, name, namelen, in add_inode_ref()
1590 btrfs_update_inode(trans, root, inode); in add_inode_ref()
1611 ret = unlink_old_inode_refs(trans, root, path, BTRFS_I(inode), eb, slot, in add_inode_ref()
1617 ret = overwrite_item(trans, root, path, eb, slot, key); in add_inode_ref()
1626 static int insert_orphan_item(struct btrfs_trans_handle *trans, in insert_orphan_item() argument
1631 ret = btrfs_insert_orphan_item(trans, root, ino); in insert_orphan_item()
1749 static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans, in fixup_inode_link_count() argument
1778 btrfs_update_inode(trans, root, inode); in fixup_inode_link_count()
1784 ret = replay_dir_deletes(trans, root, NULL, path, in fixup_inode_link_count()
1789 ret = insert_orphan_item(trans, root, ino); in fixup_inode_link_count()
1797 static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans, in fixup_inode_link_counts() argument
1809 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in fixup_inode_link_counts()
1825 ret = btrfs_del_item(trans, root, path); in fixup_inode_link_counts()
1836 ret = fixup_inode_link_count(trans, root, inode); in fixup_inode_link_counts()
1858 static noinline int link_to_fixup_dir(struct btrfs_trans_handle *trans, in link_to_fixup_dir() argument
1875 ret = btrfs_insert_empty_item(trans, root, path, &key, 0); in link_to_fixup_dir()
1883 ret = btrfs_update_inode(trans, root, inode); in link_to_fixup_dir()
1897 static noinline int insert_one_name(struct btrfs_trans_handle *trans, in insert_one_name() argument
1917 ret = btrfs_add_link(trans, BTRFS_I(dir), BTRFS_I(inode), name, in insert_one_name()
1967 static noinline int replay_one_name(struct btrfs_trans_handle *trans, in replay_one_name() argument
2002 ret = btrfs_lookup_inode(trans, root, path, &log_key, 0); in replay_one_name()
2010 dst_di = btrfs_lookup_dir_item(trans, root, path, key->objectid, in replay_one_name()
2013 dst_di = btrfs_lookup_dir_index_item(trans, root, path, in replay_one_name()
2052 ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), dst_di); in replay_one_name()
2062 ret = btrfs_update_inode(trans, root, dir); in replay_one_name()
2079 ret = insert_one_name(trans, root, key->objectid, key->offset, in replay_one_name()
2096 static noinline int replay_one_dir_item(struct btrfs_trans_handle *trans, in replay_one_dir_item() argument
2115 ret = replay_one_name(trans, root, path, eb, di, key); in replay_one_dir_item()
2160 ret = link_to_fixup_dir(trans, root, fixup_path, in replay_one_dir_item()
2258 static noinline int check_item_in_log(struct btrfs_trans_handle *trans, in check_item_in_log() argument
2297 log_di = btrfs_lookup_dir_item(trans, log, log_path, in check_item_in_log()
2301 log_di = btrfs_lookup_dir_index_item(trans, log, in check_item_in_log()
2317 ret = link_to_fixup_dir(trans, root, in check_item_in_log()
2326 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in check_item_in_log()
2329 ret = btrfs_run_delayed_items(trans); in check_item_in_log()
2361 static int replay_xattr_deletes(struct btrfs_trans_handle *trans, in replay_xattr_deletes() argument
2422 di = btrfs_lookup_xattr(trans, root, path, ino, in replay_xattr_deletes()
2430 ret = btrfs_delete_one_dir_name(trans, root, in replay_xattr_deletes()
2469 static noinline int replay_dir_deletes(struct btrfs_trans_handle *trans, in replay_dir_deletes() argument
2539 ret = check_item_in_log(trans, root, log, path, in replay_dir_deletes()
2629 ret = replay_xattr_deletes(wc->trans, root, log, in replay_one_buffer()
2635 ret = replay_dir_deletes(wc->trans, in replay_one_buffer()
2640 ret = overwrite_item(wc->trans, root, path, in replay_one_buffer()
2664 ret = btrfs_drop_extents(wc->trans, root, inode, in replay_one_buffer()
2668 ret = btrfs_update_inode(wc->trans, in replay_one_buffer()
2676 ret = link_to_fixup_dir(wc->trans, root, in replay_one_buffer()
2687 ret = replay_one_dir_item(wc->trans, root, path, in replay_one_buffer()
2698 ret = overwrite_item(wc->trans, root, path, in replay_one_buffer()
2704 ret = add_inode_ref(wc->trans, root, log, path, in replay_one_buffer()
2710 ret = replay_one_extent(wc->trans, root, path, in replay_one_buffer()
2715 ret = replay_one_dir_item(wc->trans, root, path, in replay_one_buffer()
2725 static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, in walk_down_log_tree() argument
2785 if (trans) { in walk_down_log_tree()
2832 static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans, in walk_up_log_tree() argument
2869 if (trans) { in walk_up_log_tree()
2901 static int walk_log_tree(struct btrfs_trans_handle *trans, in walk_log_tree() argument
2922 wret = walk_down_log_tree(trans, log, path, &level, wc); in walk_log_tree()
2930 wret = walk_up_log_tree(trans, log, path, &level, wc); in walk_log_tree()
2951 if (trans) { in walk_log_tree()
2980 static int update_log_root(struct btrfs_trans_handle *trans, in update_log_root() argument
2989 ret = btrfs_insert_root(trans, fs_info->log_root_tree, in update_log_root()
2992 ret = btrfs_update_root(trans, fs_info->log_root_tree, in update_log_root()
3081 int btrfs_sync_log(struct btrfs_trans_handle *trans, in btrfs_sync_log() argument
3131 if (btrfs_need_log_full_commit(trans)) { in btrfs_sync_log()
3149 btrfs_abort_transaction(trans, ret); in btrfs_sync_log()
3150 btrfs_set_log_full_commit(trans); in btrfs_sync_log()
3194 ret = update_log_root(trans, log, &new_root_item); in btrfs_sync_log()
3200 btrfs_set_log_full_commit(trans); in btrfs_sync_log()
3203 btrfs_abort_transaction(trans, ret); in btrfs_sync_log()
3244 if (btrfs_need_log_full_commit(trans)) { in btrfs_sync_log()
3257 btrfs_set_log_full_commit(trans); in btrfs_sync_log()
3258 btrfs_abort_transaction(trans, ret); in btrfs_sync_log()
3267 btrfs_set_log_full_commit(trans); in btrfs_sync_log()
3289 btrfs_set_log_full_commit(trans); in btrfs_sync_log()
3290 btrfs_abort_transaction(trans, ret); in btrfs_sync_log()
3329 static void free_log_tree(struct btrfs_trans_handle *trans, in free_log_tree() argument
3338 ret = walk_log_tree(trans, log, &wc); in free_log_tree()
3340 if (trans) in free_log_tree()
3341 btrfs_abort_transaction(trans, ret); in free_log_tree()
3356 int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root) in btrfs_free_log() argument
3359 free_log_tree(trans, root->log_root); in btrfs_free_log()
3366 int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, in btrfs_free_log_root_tree() argument
3370 free_log_tree(trans, fs_info->log_root_tree); in btrfs_free_log_root_tree()
3386 static bool inode_logged(struct btrfs_trans_handle *trans, in inode_logged() argument
3389 if (inode->logged_trans == trans->transid) in inode_logged()
3392 if (inode->last_trans == trans->transid && in inode_logged()
3394 !test_bit(BTRFS_FS_LOG_RECOVERING, &trans->fs_info->flags)) in inode_logged()
3421 int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans, in btrfs_del_dir_entries_in_log() argument
3434 if (!inode_logged(trans, dir)) in btrfs_del_dir_entries_in_log()
3450 di = btrfs_lookup_dir_item(trans, log, path, dir_ino, in btrfs_del_dir_entries_in_log()
3457 ret = btrfs_delete_one_dir_name(trans, log, path, di); in btrfs_del_dir_entries_in_log()
3465 di = btrfs_lookup_dir_index_item(trans, log, path, dir_ino, in btrfs_del_dir_entries_in_log()
3472 ret = btrfs_delete_one_dir_name(trans, log, path, di); in btrfs_del_dir_entries_in_log()
3491 ret = btrfs_search_slot(trans, log, &key, path, 0, 1); in btrfs_del_dir_entries_in_log()
3518 btrfs_set_log_full_commit(trans); in btrfs_del_dir_entries_in_log()
3521 btrfs_abort_transaction(trans, err); in btrfs_del_dir_entries_in_log()
3530 int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans, in btrfs_del_inode_ref_in_log() argument
3539 if (!inode_logged(trans, inode)) in btrfs_del_inode_ref_in_log()
3548 ret = btrfs_del_inode_ref(trans, log, name, name_len, btrfs_ino(inode), in btrfs_del_inode_ref_in_log()
3552 btrfs_set_log_full_commit(trans); in btrfs_del_inode_ref_in_log()
3555 btrfs_abort_transaction(trans, ret); in btrfs_del_inode_ref_in_log()
3566 static noinline int insert_dir_log_key(struct btrfs_trans_handle *trans, in insert_dir_log_key() argument
3582 ret = btrfs_insert_empty_item(trans, log, path, &key, sizeof(*item)); in insert_dir_log_key()
3599 static noinline int log_dir_items(struct btrfs_trans_handle *trans, in log_dir_items() argument
3623 ret = btrfs_search_forward(root, &min_key, path, trans->transid); in log_dir_items()
3663 ret = overwrite_item(trans, log, dst_path, in log_dir_items()
3709 ret = overwrite_item(trans, log, dst_path, src, i, in log_dir_items()
3742 (btrfs_dir_transid(src, di) == trans->transid || in log_dir_items()
3766 if (btrfs_header_generation(path->nodes[0]) != trans->transid) { in log_dir_items()
3767 ret = overwrite_item(trans, log, dst_path, in log_dir_items()
3787 ret = insert_dir_log_key(trans, log, path, key_type, in log_dir_items()
3807 static noinline int log_directory_changes(struct btrfs_trans_handle *trans, in log_directory_changes() argument
3822 ret = log_dir_items(trans, root, inode, path, dst_path, key_type, in log_directory_changes()
3844 static int drop_objectid_items(struct btrfs_trans_handle *trans, in drop_objectid_items() argument
3859 ret = btrfs_search_slot(trans, log, &key, path, -1, 1); in drop_objectid_items()
3881 ret = btrfs_del_items(trans, log, path, start_slot, in drop_objectid_items()
3897 static void fill_inode_item(struct btrfs_trans_handle *trans, in fill_inode_item() argument
3947 btrfs_set_token_inode_transid(leaf, item, trans->transid, &token); in fill_inode_item()
3953 static int log_inode_item(struct btrfs_trans_handle *trans, in log_inode_item() argument
3960 ret = btrfs_insert_empty_item(trans, log, path, in log_inode_item()
3966 fill_inode_item(trans, path->nodes[0], inode_item, &inode->vfs_inode, in log_inode_item()
3972 static int log_csums(struct btrfs_trans_handle *trans, in log_csums() argument
3987 ret = btrfs_del_csums(trans, log_root, sums->bytenr, sums->len); in log_csums()
3991 return btrfs_csum_file_blocks(trans, log_root, sums); in log_csums()
3994 static noinline int copy_items(struct btrfs_trans_handle *trans, in copy_items() argument
4001 struct btrfs_fs_info *fs_info = trans->fs_info; in copy_items()
4030 ret = btrfs_insert_empty_items(trans, log, dst_path, in copy_items()
4047 fill_inode_item(trans, dst_path->nodes[0], inode_item, in copy_items()
4066 if (btrfs_file_extent_generation(src, extent) < trans->transid) in copy_items()
4112 ret = log_csums(trans, log, sums); in copy_items()
4134 static int log_extent_csums(struct btrfs_trans_handle *trans, in log_extent_csums() argument
4159 ret = btrfs_lookup_csums_range(trans->fs_info->csum_root, in log_extent_csums()
4171 ret = log_csums(trans, log_root, sums); in log_extent_csums()
4179 static int log_one_extent(struct btrfs_trans_handle *trans, in log_one_extent() argument
4195 ret = log_extent_csums(trans, inode, log, em); in log_one_extent()
4199 ret = __btrfs_drop_extents(trans, log, &inode->vfs_inode, path, em->start, in log_one_extent()
4210 ret = btrfs_insert_empty_item(trans, log, path, &key, in log_one_extent()
4220 btrfs_set_token_file_extent_generation(leaf, fi, trans->transid, in log_one_extent()
4272 static int btrfs_log_prealloc_extents(struct btrfs_trans_handle *trans, in btrfs_log_prealloc_extents() argument
4339 ret = copy_items(trans, inode, dst_path, path, in btrfs_log_prealloc_extents()
4370 ret = btrfs_truncate_inode_items(trans, in btrfs_log_prealloc_extents()
4393 ret = copy_items(trans, inode, dst_path, path, in btrfs_log_prealloc_extents()
4404 static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans, in btrfs_log_changed_extents() argument
4489 ret = log_one_extent(trans, inode, root, em, path, ctx); in btrfs_log_changed_extents()
4499 ret = btrfs_log_prealloc_extents(trans, inode, path); in btrfs_log_changed_extents()
4553 static int btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, in btrfs_log_all_xattrs() argument
4580 ret = copy_items(trans, inode, dst_path, path, in btrfs_log_all_xattrs()
4605 ret = copy_items(trans, inode, dst_path, path, in btrfs_log_all_xattrs()
4623 static int btrfs_log_holes(struct btrfs_trans_handle *trans, in btrfs_log_holes() argument
4676 ret = btrfs_insert_file_extent(trans, root->log_root, in btrfs_log_holes()
4719 ret = btrfs_insert_file_extent(trans, root->log_root, in btrfs_log_holes()
4871 static int log_conflicting_inodes(struct btrfs_trans_handle *trans, in log_conflicting_inodes() argument
4922 ret = btrfs_log_inode(trans, root, in log_conflicting_inodes()
4969 if (BTRFS_I(inode)->logged_trans == trans->transid) { in log_conflicting_inodes()
4982 ret = btrfs_log_inode(trans, root, BTRFS_I(inode), in log_conflicting_inodes()
5047 static int copy_inode_items_to_log(struct btrfs_trans_handle *trans, in copy_inode_items_to_log() argument
5066 ret = btrfs_search_forward(root, min_key, path, trans->transid); in copy_inode_items_to_log()
5093 inode->generation == trans->transid && in copy_inode_items_to_log()
5111 ret = copy_items(trans, inode, dst_path, path, in copy_inode_items_to_log()
5118 ret = log_conflicting_inodes(trans, root, path, in copy_inode_items_to_log()
5129 ret = copy_items(trans, inode, dst_path, path, in copy_inode_items_to_log()
5147 ret = copy_items(trans, inode, dst_path, path, ins_start_slot, in copy_inode_items_to_log()
5161 ret = copy_items(trans, inode, dst_path, path, in copy_inode_items_to_log()
5180 ret = copy_items(trans, inode, dst_path, path, ins_start_slot, in copy_inode_items_to_log()
5192 ret = btrfs_log_prealloc_extents(trans, inode, dst_path); in copy_inode_items_to_log()
5212 static int btrfs_log_inode(struct btrfs_trans_handle *trans, in btrfs_log_inode() argument
5272 ret = btrfs_commit_inode_delayed_items(trans, inode); in btrfs_log_inode()
5314 ret = drop_objectid_items(trans, log, path, ino, max_key_type); in btrfs_log_inode()
5338 ret = drop_objectid_items(trans, log, path, ino, in btrfs_log_inode()
5346 ret = btrfs_truncate_inode_items(trans, in btrfs_log_inode()
5358 ret = drop_objectid_items(trans, log, path, ino, in btrfs_log_inode()
5372 err = copy_inode_items_to_log(trans, inode, &min_key, &max_key, in btrfs_log_inode()
5381 err = btrfs_log_all_xattrs(trans, root, inode, path, dst_path); in btrfs_log_inode()
5388 err = btrfs_log_holes(trans, root, inode, path); in btrfs_log_inode()
5396 err = log_inode_item(trans, log, dst_path, inode); in btrfs_log_inode()
5398 err = btrfs_log_all_xattrs(trans, root, inode, path, in btrfs_log_inode()
5406 ret = btrfs_log_changed_extents(trans, root, inode, dst_path, in btrfs_log_inode()
5445 ret = log_directory_changes(trans, root, inode, path, dst_path, in btrfs_log_inode()
5467 inode->logged_trans = trans->transid; in btrfs_log_inode()
5506 static bool btrfs_must_commit_transaction(struct btrfs_trans_handle *trans, in btrfs_must_commit_transaction() argument
5518 btrfs_set_log_full_commit(trans); in btrfs_must_commit_transaction()
5532 static noinline int check_parent_dirs_for_sync(struct btrfs_trans_handle *trans, in check_parent_dirs_for_sync() argument
5559 if (btrfs_must_commit_transaction(trans, inode)) { in check_parent_dirs_for_sync()
5569 if (btrfs_must_commit_transaction(trans, inode)) in check_parent_dirs_for_sync()
5632 static int log_new_dir_dentries(struct btrfs_trans_handle *trans, in log_new_dir_dentries() argument
5672 ret = btrfs_search_forward(log, &min_key, path, trans->transid); in log_new_dir_dentries()
5698 if (btrfs_dir_transid(leaf, di) < trans->transid && in log_new_dir_dentries()
5712 if (btrfs_inode_in_log(BTRFS_I(di_inode), trans->transid)) { in log_new_dir_dentries()
5720 ret = btrfs_log_inode(trans, root, BTRFS_I(di_inode), in log_new_dir_dentries()
5723 btrfs_must_commit_transaction(trans, BTRFS_I(di_inode))) in log_new_dir_dentries()
5763 static int btrfs_log_all_parents(struct btrfs_trans_handle *trans, in btrfs_log_all_parents() argument
5767 struct btrfs_fs_info *fs_info = trans->fs_info; in btrfs_log_all_parents()
5864 ret = btrfs_log_inode(trans, root, BTRFS_I(dir_inode), in btrfs_log_all_parents()
5867 btrfs_must_commit_transaction(trans, BTRFS_I(dir_inode))) in btrfs_log_all_parents()
5870 ret = log_new_dir_dentries(trans, root, in btrfs_log_all_parents()
5884 static int log_new_ancestors(struct btrfs_trans_handle *trans, in log_new_ancestors() argument
5912 ret = btrfs_log_inode(trans, root, BTRFS_I(inode), in log_new_ancestors()
5947 static int log_new_ancestors_fast(struct btrfs_trans_handle *trans, in log_new_ancestors_fast() argument
5968 ret = btrfs_log_inode(trans, root, inode, in log_new_ancestors_fast()
5985 static int log_all_new_ancestors(struct btrfs_trans_handle *trans, in log_all_new_ancestors() argument
6001 return log_new_ancestors_fast(trans, inode, parent, ctx); in log_all_new_ancestors()
6056 ret = log_new_ancestors(trans, root, path, ctx); in log_all_new_ancestors()
6074 static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans, in btrfs_log_inode_parent() argument
6111 ret = check_parent_dirs_for_sync(trans, inode, parent, sb, in btrfs_log_inode_parent()
6121 if (btrfs_inode_in_log(inode, trans->transid) || in btrfs_log_inode_parent()
6127 ret = start_log_trans(trans, root, ctx); in btrfs_log_inode_parent()
6131 ret = btrfs_log_inode(trans, root, inode, inode_only, start, end, ctx); in btrfs_log_inode_parent()
6193 ret = btrfs_log_all_parents(trans, inode, ctx); in btrfs_log_inode_parent()
6198 ret = log_all_new_ancestors(trans, inode, parent, ctx); in btrfs_log_inode_parent()
6203 ret = log_new_dir_dentries(trans, root, inode, ctx); in btrfs_log_inode_parent()
6208 btrfs_set_log_full_commit(trans); in btrfs_log_inode_parent()
6225 int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, in btrfs_log_dentry_safe() argument
6234 ret = btrfs_log_inode_parent(trans, BTRFS_I(d_inode(dentry)), parent, in btrfs_log_dentry_safe()
6249 struct btrfs_trans_handle *trans; in btrfs_recover_log_trees() local
6266 trans = btrfs_start_transaction(fs_info->tree_root, 0); in btrfs_recover_log_trees()
6267 if (IS_ERR(trans)) { in btrfs_recover_log_trees()
6268 ret = PTR_ERR(trans); in btrfs_recover_log_trees()
6272 wc.trans = trans; in btrfs_recover_log_trees()
6275 ret = walk_log_tree(trans, log_root_tree, &wc); in btrfs_recover_log_trees()
6349 btrfs_record_root_in_trans(trans, wc.replay_dest); in btrfs_recover_log_trees()
6350 ret = walk_log_tree(trans, log, &wc); in btrfs_recover_log_trees()
6353 ret = fixup_inode_link_counts(trans, wc.replay_dest, in btrfs_recover_log_trees()
6404 ret = btrfs_commit_transaction(trans); in btrfs_recover_log_trees()
6415 if (wc.trans) in btrfs_recover_log_trees()
6416 btrfs_end_transaction(wc.trans); in btrfs_recover_log_trees()
6433 void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans, in btrfs_record_unlink_dir() argument
6448 inode->last_unlink_trans = trans->transid; in btrfs_record_unlink_dir()
6455 if (dir->logged_trans == trans->transid) in btrfs_record_unlink_dir()
6462 if (inode->logged_trans == trans->transid) in btrfs_record_unlink_dir()
6480 dir->last_unlink_trans = trans->transid; in btrfs_record_unlink_dir()
6496 void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans, in btrfs_record_snapshot_destroy() argument
6500 dir->last_unlink_trans = trans->transid; in btrfs_record_snapshot_destroy()
6508 void btrfs_log_new_name(struct btrfs_trans_handle *trans, in btrfs_log_new_name() argument
6519 inode->last_unlink_trans = trans->transid; in btrfs_log_new_name()
6525 if (!inode_logged(trans, inode) && in btrfs_log_new_name()
6526 (!old_dir || !inode_logged(trans, old_dir))) in btrfs_log_new_name()
6538 btrfs_log_inode_parent(trans, inode, parent, 0, LLONG_MAX, in btrfs_log_new_name()