Lines Matching refs:log
105 struct btrfs_root *log,
289 int (*process_func)(struct btrfs_root *log, struct extent_buffer *eb,
296 static int process_one_buffer(struct btrfs_root *log, in process_one_buffer() argument
300 struct btrfs_fs_info *fs_info = log->fs_info; in process_one_buffer()
943 static noinline int backref_in_log(struct btrfs_root *log, in backref_in_log() argument
962 ret = btrfs_search_slot(NULL, log, key, path, 0, 0); in backref_in_log()
1418 struct btrfs_root *log, in add_inode_ref() argument
1505 ret = __add_inode_ref(trans, root, path, log, in add_inode_ref()
2217 struct btrfs_root *log, in check_item_in_log() argument
2253 if (log && dir_key->type == BTRFS_DIR_ITEM_KEY) { in check_item_in_log()
2254 log_di = btrfs_lookup_dir_item(trans, log, log_path, in check_item_in_log()
2257 } else if (log && dir_key->type == BTRFS_DIR_INDEX_KEY) { in check_item_in_log()
2258 log_di = btrfs_lookup_dir_index_item(trans, log, in check_item_in_log()
2320 struct btrfs_root *log, in replay_xattr_deletes() argument
2373 log_di = btrfs_lookup_xattr(NULL, log, log_path, ino, in replay_xattr_deletes()
2428 struct btrfs_root *log, in replay_dir_deletes() argument
2463 ret = find_dir_range(log, path, dirid, key_type, in replay_dir_deletes()
2494 ret = check_item_in_log(trans, root, log, path, in replay_dir_deletes()
2535 static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb, in replay_one_buffer() argument
2584 ret = replay_xattr_deletes(wc->trans, root, log, in replay_one_buffer()
2591 root, log, path, key.objectid, 0); in replay_one_buffer()
2659 ret = add_inode_ref(wc->trans, root, log, path, in replay_one_buffer()
2857 struct btrfs_root *log, struct walk_control *wc) in walk_log_tree() argument
2859 struct btrfs_fs_info *fs_info = log->fs_info; in walk_log_tree()
2870 level = btrfs_header_level(log->node); in walk_log_tree()
2872 path->nodes[level] = log->node; in walk_log_tree()
2873 extent_buffer_get(log->node); in walk_log_tree()
2877 wret = walk_down_log_tree(trans, log, path, &level, wc); in walk_log_tree()
2885 wret = walk_up_log_tree(trans, log, path, &level, wc); in walk_log_tree()
2896 ret = wc->process_func(log, path->nodes[orig_level], wc, in walk_log_tree()
2917 WARN_ON(log->root_key.objectid != in walk_log_tree()
2936 struct btrfs_root *log, in update_log_root() argument
2939 struct btrfs_fs_info *fs_info = log->fs_info; in update_log_root()
2942 if (log->log_transid == 1) { in update_log_root()
2945 &log->root_key, root_item); in update_log_root()
2948 &log->root_key, root_item); in update_log_root()
3044 struct btrfs_root *log = root->log_root; in btrfs_sync_log() local
3101 ret = btrfs_write_marked_extents(fs_info, &log->dirty_log_pages, mark); in btrfs_sync_log()
3123 btrfs_set_root_node(&log->root_item, log->node); in btrfs_sync_log()
3124 memcpy(&new_root_item, &log->root_item, sizeof(new_root_item)); in btrfs_sync_log()
3127 log->log_transid = root->log_transid; in btrfs_sync_log()
3155 ret = update_log_root(trans, log, &new_root_item); in btrfs_sync_log()
3174 btrfs_wait_tree_log_extents(log, mark); in btrfs_sync_log()
3191 ret = btrfs_wait_tree_log_extents(log, mark); in btrfs_sync_log()
3215 btrfs_wait_tree_log_extents(log, mark); in btrfs_sync_log()
3231 ret = btrfs_wait_tree_log_extents(log, mark); in btrfs_sync_log()
3299 struct btrfs_root *log) in free_log_tree() argument
3307 ret = walk_log_tree(trans, log, &wc); in free_log_tree()
3312 btrfs_handle_fs_error(log->fs_info, ret, NULL); in free_log_tree()
3315 clear_extent_bits(&log->dirty_log_pages, 0, (u64)-1, in free_log_tree()
3317 free_extent_buffer(log->node); in free_log_tree()
3318 kfree(log); in free_log_tree()
3394 struct btrfs_root *log; in btrfs_del_dir_entries_in_log() local
3411 log = root->log_root; in btrfs_del_dir_entries_in_log()
3418 di = btrfs_lookup_dir_item(trans, log, path, dir_ino, in btrfs_del_dir_entries_in_log()
3425 ret = btrfs_delete_one_dir_name(trans, log, path, di); in btrfs_del_dir_entries_in_log()
3433 di = btrfs_lookup_dir_index_item(trans, log, path, dir_ino, in btrfs_del_dir_entries_in_log()
3440 ret = btrfs_delete_one_dir_name(trans, log, path, di); in btrfs_del_dir_entries_in_log()
3459 ret = btrfs_search_slot(trans, log, &key, path, 0, 1); in btrfs_del_dir_entries_in_log()
3502 struct btrfs_root *log; in btrfs_del_inode_ref_in_log() local
3512 log = root->log_root; in btrfs_del_inode_ref_in_log()
3515 ret = btrfs_del_inode_ref(trans, log, name, name_len, btrfs_ino(inode), in btrfs_del_inode_ref_in_log()
3534 struct btrfs_root *log, in insert_dir_log_key() argument
3549 ret = btrfs_insert_empty_item(trans, log, path, &key, sizeof(*item)); in insert_dir_log_key()
3574 struct btrfs_root *log = root->log_root; in log_dir_items() local
3584 log = root->log_root; in log_dir_items()
3630 ret = overwrite_item(trans, log, dst_path, in log_dir_items()
3668 ret = overwrite_item(trans, log, dst_path, src, i, in log_dir_items()
3726 ret = overwrite_item(trans, log, dst_path, in log_dir_items()
3746 ret = insert_dir_log_key(trans, log, path, key_type, in log_dir_items()
3804 struct btrfs_root *log, in drop_objectid_items() argument
3818 ret = btrfs_search_slot(trans, log, &key, path, -1, 1); in drop_objectid_items()
3840 ret = btrfs_del_items(trans, log, path, start_slot, in drop_objectid_items()
3913 struct btrfs_root *log, struct btrfs_path *path, in log_inode_item() argument
3919 ret = btrfs_insert_empty_item(trans, log, path, in log_inode_item()
3963 struct btrfs_root *log = inode->root->log_root; in copy_items() local
3995 ret = btrfs_insert_empty_items(trans, log, dst_path, in copy_items()
4098 ret = log_csums(trans, log, sums); in copy_items()
4221 ret = btrfs_insert_file_extent(trans, log, btrfs_ino(inode), in copy_items()
4249 ret = btrfs_insert_file_extent(trans, log, in copy_items()
4332 struct btrfs_root *log = root->log_root; in log_one_extent() local
4342 ret = log_extent_csums(trans, inode, log, em); in log_one_extent()
4346 ret = __btrfs_drop_extents(trans, log, &inode->vfs_inode, path, em->start, in log_one_extent()
4357 ret = btrfs_insert_empty_item(trans, log, path, &key, in log_one_extent()
4615 static int logged_inode_size(struct btrfs_root *log, struct btrfs_inode *inode, in logged_inode_size() argument
4625 ret = btrfs_search_slot(NULL, log, &key, path, 0, 0); in logged_inode_size()
4770 struct btrfs_root *log = root->log_root; in btrfs_log_trailing_hole() local
4827 ret = btrfs_insert_file_extent(trans, log, ino, hole_start, 0, 0, in btrfs_log_trailing_hole()
5131 struct btrfs_root *log = root->log_root; in btrfs_log_inode() local
5210 ret = drop_objectid_items(trans, log, path, ino, max_key_type); in btrfs_log_inode()
5226 err = logged_inode_size(log, inode, path, &logged_isize); in btrfs_log_inode()
5234 ret = drop_objectid_items(trans, log, path, ino, in btrfs_log_inode()
5243 log, &inode->vfs_inode, 0, 0); in btrfs_log_inode()
5254 ret = drop_objectid_items(trans, log, path, ino, in btrfs_log_inode()
5430 err = log_inode_item(trans, log, dst_path, inode); in btrfs_log_inode()
5657 struct btrfs_root *log = root->log_root; in log_new_dir_dentries() local
5691 ret = btrfs_search_forward(log, &min_key, path, trans->transid); in log_new_dir_dentries()
5760 ret = btrfs_next_leaf(log, path); in log_new_dir_dentries()
6272 struct btrfs_root *log; in btrfs_recover_log_trees() local
6325 log = btrfs_read_fs_root(log_root_tree, &found_key); in btrfs_recover_log_trees()
6326 if (IS_ERR(log)) { in btrfs_recover_log_trees()
6327 ret = PTR_ERR(log); in btrfs_recover_log_trees()
6354 log->node->start, in btrfs_recover_log_trees()
6355 log->node->len); in btrfs_recover_log_trees()
6356 free_extent_buffer(log->node); in btrfs_recover_log_trees()
6357 free_extent_buffer(log->commit_root); in btrfs_recover_log_trees()
6358 kfree(log); in btrfs_recover_log_trees()
6367 wc.replay_dest->log_root = log; in btrfs_recover_log_trees()
6369 ret = walk_log_tree(trans, log, &wc); in btrfs_recover_log_trees()
6394 free_extent_buffer(log->node); in btrfs_recover_log_trees()
6395 free_extent_buffer(log->commit_root); in btrfs_recover_log_trees()
6396 kfree(log); in btrfs_recover_log_trees()