Home
last modified time | relevance | path

Searched refs:trans (Results 1 – 25 of 43) sorted by relevance

12

/fs/btrfs/
Dtransaction.c278 static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, in __btrfs_end_transaction() argument
286 WARN_ON(cur_trans != trans->transaction); in __btrfs_end_transaction()
294 memset(trans, 0, sizeof(*trans)); in __btrfs_end_transaction()
295 kmem_cache_free(btrfs_trans_handle_cachep, trans); in __btrfs_end_transaction()
303 int btrfs_end_transaction(struct btrfs_trans_handle *trans, in btrfs_end_transaction() argument
306 return __btrfs_end_transaction(trans, root, 0); in btrfs_end_transaction()
309 int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans, in btrfs_end_transaction_throttle() argument
312 return __btrfs_end_transaction(trans, root, 1); in btrfs_end_transaction_throttle()
398 int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans, in btrfs_write_and_wait_transaction() argument
401 if (!trans || !trans->transaction) { in btrfs_write_and_wait_transaction()
[all …]
Dtree-log.c50 static int __btrfs_log_inode(struct btrfs_trans_handle *trans,
53 static int link_to_fixup_dir(struct btrfs_trans_handle *trans,
85 static int start_log_trans(struct btrfs_trans_handle *trans, in start_log_trans() argument
99 ret = btrfs_init_log_root_tree(trans, root->fs_info); in start_log_trans()
103 ret = btrfs_add_log_tree(trans, root); in start_log_trans()
184 struct btrfs_trans_handle *trans; member
232 static noinline int overwrite_item(struct btrfs_trans_handle *trans, in overwrite_item() argument
293 ret = btrfs_insert_empty_item(trans, root, path, in overwrite_item()
302 btrfs_truncate_item(trans, root, path, item_size, 1); in overwrite_item()
304 ret = btrfs_extend_item(trans, root, path, in overwrite_item()
[all …]
Dinode.c109 static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, in insert_inline_extent() argument
137 btrfs_set_trans_block_group(trans, inode); in insert_inline_extent()
145 ret = btrfs_insert_empty_item(trans, root, path, &key, in insert_inline_extent()
155 btrfs_set_file_extent_generation(leaf, ei, trans->transid); in insert_inline_extent()
194 btrfs_update_inode(trans, root, inode); in insert_inline_extent()
207 static int cow_file_range_inline(struct btrfs_trans_handle *trans, in cow_file_range_inline() argument
235 ret = btrfs_drop_extents(trans, root, inode, start, in cow_file_range_inline()
241 ret = insert_inline_extent(trans, root, inode, start, in cow_file_range_inline()
309 struct btrfs_trans_handle *trans; in compress_file_range() local
403 trans = btrfs_join_transaction(root, 1); in compress_file_range()
[all …]
Dtransaction.h63 static inline void btrfs_set_trans_block_group(struct btrfs_trans_handle *trans, in btrfs_set_trans_block_group() argument
66 trans->block_group = BTRFS_I(inode)->block_group; in btrfs_set_trans_block_group()
70 struct btrfs_trans_handle *trans, in btrfs_update_inode_block_group() argument
73 BTRFS_I(inode)->block_group = trans->block_group; in btrfs_update_inode_block_group()
76 static inline void btrfs_set_inode_last_trans(struct btrfs_trans_handle *trans, in btrfs_set_inode_last_trans() argument
79 BTRFS_I(inode)->last_trans = trans->transaction->transid; in btrfs_set_inode_last_trans()
82 int btrfs_end_transaction(struct btrfs_trans_handle *trans,
90 int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans,
92 int btrfs_commit_tree_roots(struct btrfs_trans_handle *trans,
98 int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
[all …]
Dctree.c26 static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
28 static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
31 static int push_node_left(struct btrfs_trans_handle *trans,
34 static int balance_node_right(struct btrfs_trans_handle *trans,
38 static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root,
191 int btrfs_copy_root(struct btrfs_trans_handle *trans, in btrfs_copy_root() argument
209 WARN_ON(root->ref_cows && trans->transid != in btrfs_copy_root()
211 WARN_ON(root->ref_cows && trans->transid != root->last_trans); in btrfs_copy_root()
216 cow = btrfs_alloc_free_block(trans, new_root, buf->len, 0, in btrfs_copy_root()
217 new_root_objectid, trans->transid, in btrfs_copy_root()
[all …]
Dextent-tree.c52 static int finish_current_insert(struct btrfs_trans_handle *trans,
54 static int del_pending_extents(struct btrfs_trans_handle *trans,
56 static int pin_down_bytes(struct btrfs_trans_handle *trans,
59 static int update_block_group(struct btrfs_trans_handle *trans,
64 static int do_chunk_alloc(struct btrfs_trans_handle *trans,
516 static noinline int lookup_extent_backref(struct btrfs_trans_handle *trans, in lookup_extent_backref() argument
533 ret = btrfs_search_slot(trans, root, &key, path, del ? -1 : 0, 1); in lookup_extent_backref()
561 static noinline int update_backrefs(struct btrfs_trans_handle *trans, in update_backrefs() argument
583 ret = btrfs_search_slot(trans, extent_root, &key, path, 0, 1); in update_backrefs()
609 ret = btrfs_set_item_key_safe(trans, extent_root, path, &key); in update_backrefs()
[all …]
Ddir-item.c33 *trans, in insert_with_overflow()
46 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); in insert_with_overflow()
52 ret = btrfs_extend_item(trans, root, path, data_size); in insert_with_overflow()
70 int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans, in btrfs_insert_xattr_item() argument
95 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
111 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_xattr_item()
131 int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root in btrfs_insert_dir_item() argument
150 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
165 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_dir_item()
181 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
[all …]
Dtree-log.h22 int btrfs_sync_log(struct btrfs_trans_handle *trans,
24 int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root);
25 int btrfs_log_dentry(struct btrfs_trans_handle *trans,
28 int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
30 int btrfs_log_inode(struct btrfs_trans_handle *trans,
33 int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
37 int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans,
Dioctl.c59 struct btrfs_trans_handle *trans; in create_subvol() local
77 trans = btrfs_start_transaction(root, 1); in create_subvol()
78 BUG_ON(!trans); in create_subvol()
80 ret = btrfs_find_free_objectid(trans, root->fs_info->tree_root, in create_subvol()
85 leaf = btrfs_alloc_free_block(trans, root, root->leafsize, 0, in create_subvol()
86 objectid, trans->transid, 0, 0, 0); in create_subvol()
95 btrfs_set_header_generation(leaf, trans->transid); in create_subvol()
112 btrfs_set_root_generation(&root_item, trans->transid); in create_subvol()
130 ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, in create_subvol()
143 ret = btrfs_insert_dir_item(trans, root, in create_subvol()
[all …]
Dctree.h1708 int btrfs_lookup_extent_ref(struct btrfs_trans_handle *trans,
1713 int btrfs_drop_leaf_ref(struct btrfs_trans_handle *trans,
1715 int btrfs_cross_ref_exist(struct btrfs_trans_handle *trans,
1717 int btrfs_extent_post_op(struct btrfs_trans_handle *trans,
1725 struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
1733 struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,
1737 int btrfs_alloc_extent(struct btrfs_trans_handle *trans,
1743 int btrfs_alloc_reserved_extent(struct btrfs_trans_handle *trans,
1747 int btrfs_alloc_logged_extent(struct btrfs_trans_handle *trans,
1751 int btrfs_reserve_extent(struct btrfs_trans_handle *trans,
[all …]
Dinode-item.c52 int btrfs_del_inode_ref(struct btrfs_trans_handle *trans, in btrfs_del_inode_ref() argument
76 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_ref()
94 ret = btrfs_del_item(trans, root, path); in btrfs_del_inode_ref()
102 ret = btrfs_truncate_item(trans, root, path, in btrfs_del_inode_ref()
110 int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, in btrfs_insert_inode_ref() argument
130 ret = btrfs_insert_empty_item(trans, root, path, &key, in btrfs_insert_inode_ref()
139 ret = btrfs_extend_item(trans, root, path, ins_len); in btrfs_insert_inode_ref()
165 int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans, in btrfs_insert_empty_inode() argument
175 ret = btrfs_insert_empty_item(trans, root, path, &key, in btrfs_insert_empty_inode()
182 int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root in btrfs_lookup_inode() argument
[all …]
Dfile.c105 static noinline int dirty_and_release_pages(struct btrfs_trans_handle *trans, in dirty_and_release_pages() argument
131 trans = btrfs_join_transaction(root, 1); in dirty_and_release_pages()
132 if (!trans) { in dirty_and_release_pages()
136 btrfs_set_trans_block_group(trans, inode); in dirty_and_release_pages()
154 btrfs_update_inode(trans, root, inode); in dirty_and_release_pages()
156 err = btrfs_end_transaction(trans, root); in dirty_and_release_pages()
364 noinline int btrfs_drop_extents(struct btrfs_trans_handle *trans, in btrfs_drop_extents() argument
403 ret = btrfs_lookup_file_extent(trans, root, path, inode->i_ino, in btrfs_drop_extents()
525 ret = btrfs_inc_extent_ref(trans, root, in btrfs_drop_extents()
529 trans->transid, inode->i_ino); in btrfs_drop_extents()
[all …]
Droot-tree.c117 int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root in btrfs_update_root() argument
129 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
152 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root in btrfs_insert_root() argument
157 ret = btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
248 int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, in btrfs_del_root() argument
259 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
269 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
277 int btrfs_del_root_ref(struct btrfs_trans_handle *trans,
291 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
294 ret = btrfs_del_item(trans, tree_root, path);
[all …]
Dorphan.c22 int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans, in btrfs_insert_orphan_item() argument
37 ret = btrfs_insert_empty_item(trans, root, path, &key, 0); in btrfs_insert_orphan_item()
43 int btrfs_del_orphan_item(struct btrfs_trans_handle *trans, in btrfs_del_orphan_item() argument
58 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_orphan_item()
62 ret = btrfs_del_item(trans, root, path); in btrfs_del_orphan_item()
Dvolumes.c44 static int init_first_rw_device(struct btrfs_trans_handle *trans,
593 static noinline int find_free_dev_extent(struct btrfs_trans_handle *trans, in find_free_dev_extent() argument
629 ret = btrfs_search_slot(trans, root, &key, path, 0, 0); in find_free_dev_extent()
711 static int btrfs_free_dev_extent(struct btrfs_trans_handle *trans, in btrfs_free_dev_extent() argument
731 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_free_dev_extent()
752 ret = btrfs_del_item(trans, root, path); in btrfs_free_dev_extent()
759 int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, in btrfs_alloc_dev_extent() argument
779 ret = btrfs_insert_empty_item(trans, root, path, &key, in btrfs_alloc_dev_extent()
885 int btrfs_add_device(struct btrfs_trans_handle *trans, in btrfs_add_device() argument
906 ret = btrfs_insert_empty_item(trans, root, path, &key, in btrfs_add_device()
[all …]
Dfile-item.c36 int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, in btrfs_insert_file_extent() argument
55 ret = btrfs_insert_empty_item(trans, root, path, &file_key, in btrfs_insert_file_extent()
68 btrfs_set_file_extent_generation(leaf, item, trans->transid); in btrfs_insert_file_extent()
80 struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans, in btrfs_lookup_csum() argument
98 ret = btrfs_search_slot(trans, root, &file_key, path, 0, cow); in btrfs_lookup_csum()
132 int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, in btrfs_lookup_file_extent() argument
145 ret = btrfs_search_slot(trans, root, &file_key, path, ins_len, cow); in btrfs_lookup_file_extent()
447 static noinline int truncate_one_csum(struct btrfs_trans_handle *trans, in truncate_one_csum() argument
475 ret = btrfs_truncate_item(trans, root, path, new_size, 1); in truncate_one_csum()
488 ret = btrfs_truncate_item(trans, root, path, new_size, 0); in truncate_one_csum()
[all …]
Dxattr.c93 struct btrfs_trans_handle *trans; in __btrfs_setxattr() local
101 trans = btrfs_join_transaction(root, 1); in __btrfs_setxattr()
102 btrfs_set_trans_block_group(trans, inode); in __btrfs_setxattr()
105 di = btrfs_lookup_xattr(trans, root, path, inode->i_ino, name, in __btrfs_setxattr()
120 ret = btrfs_delete_one_dir_name(trans, root, path, di); in __btrfs_setxattr()
141 ret = btrfs_insert_xattr_item(trans, root, name, strlen(name), in __btrfs_setxattr()
150 ret = btrfs_update_inode(trans, root, inode); in __btrfs_setxattr()
153 btrfs_end_transaction(trans, root); in __btrfs_setxattr()
Dtree-defrag.c31 int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, in btrfs_defrag_leaves() argument
103 wret = btrfs_search_slot(trans, root, &key, path, 0, 1); in btrfs_defrag_leaves()
116 ret = btrfs_realloc_node(trans, root, in btrfs_defrag_leaves()
128 btrfs_extent_post_op(trans, root); in btrfs_defrag_leaves()
145 root->defrag_trans_start = trans->transid; in btrfs_defrag_leaves()
Ddisk-io.h45 int clean_tree_block(struct btrfs_trans_handle *trans,
51 int write_ctree_super(struct btrfs_trans_handle *trans,
97 int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans,
99 int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,
101 int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
Dvolumes.h119 int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans,
131 int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
144 int btrfs_add_device(struct btrfs_trans_handle *trans,
152 int btrfs_grow_device(struct btrfs_trans_handle *trans,
/fs/xfs/
Dxfs_attr.c296 args.trans = xfs_trans_alloc(mp, XFS_TRANS_ATTR_SET); in xfs_attr_set_int()
304 args.trans->t_flags |= XFS_TRANS_RESERVE; in xfs_attr_set_int()
306 if ((error = xfs_trans_reserve(args.trans, args.total, in xfs_attr_set_int()
309 xfs_trans_cancel(args.trans, 0); in xfs_attr_set_int()
314 error = XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, args.trans, dp, args.total, 0, in xfs_attr_set_int()
319 xfs_trans_cancel(args.trans, XFS_TRANS_RELEASE_LOG_RES); in xfs_attr_set_int()
323 xfs_trans_ijoin(args.trans, dp, XFS_ILOCK_EXCL); in xfs_attr_set_int()
324 xfs_trans_ihold(args.trans, dp); in xfs_attr_set_int()
350 ASSERT(args.trans != NULL); in xfs_attr_set_int()
358 xfs_trans_set_sync(args.trans); in xfs_attr_set_int()
[all …]
Dxfs_attr_leaf.c63 STATIC void xfs_attr_leaf_compact(xfs_trans_t *trans, xfs_dabuf_t *leaf_buffer);
76 STATIC int xfs_attr_node_inactive(xfs_trans_t **trans, xfs_inode_t *dp,
78 STATIC int xfs_attr_leaf_inactive(xfs_trans_t **trans, xfs_inode_t *dp,
80 STATIC int xfs_attr_leaf_freextent(xfs_trans_t **trans, xfs_inode_t *dp,
241 xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_ADATA); in xfs_attr_shortform_create()
295 xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_ADATA); in xfs_attr_shortform_add()
297 xfs_sbversion_add_attr2(mp, args->trans); in xfs_attr_shortform_add()
362 xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE); in xfs_attr_shortform_remove()
375 xfs_trans_log_inode(args->trans, dp, in xfs_attr_shortform_remove()
379 xfs_sbversion_add_attr2(mp, args->trans); in xfs_attr_shortform_remove()
[all …]
Dxfs_dir2_trace.c87 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args()
103 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args_b()
120 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args_bb()
141 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args_bibii()
160 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args_db()
176 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args_i()
193 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args_s()
212 (void *)args->dp, (void *)args->trans, in xfs_dir2_trace_args_sb()
Dxfs_da_btree.c118 tp = args->trans; in xfs_da_node_create()
267 xfs_da_log_buf(state->args->trans, bp, in xfs_da_split()
281 xfs_da_log_buf(state->args->trans, bp, in xfs_da_split()
320 tp = args->trans; in xfs_da_root_split()
495 tp = state->args->trans; in xfs_da_node_rebalance()
605 xfs_da_log_buf(state->args->trans, oldblk->bp, in xfs_da_node_add()
608 xfs_da_log_buf(state->args->trans, oldblk->bp, in xfs_da_node_add()
739 error = xfs_da_read_buf(args->trans, args->dp, child, -1, &bp, in xfs_da_root_join()
754 xfs_da_log_buf(args->trans, root_blk->bp, 0, state->blocksize - 1); in xfs_da_root_join()
834 error = xfs_da_read_buf(state->args->trans, state->args->dp, in xfs_da_node_toosmall()
[all …]
Dxfs_log_recover.c1359 xlog_recover_t *trans) in xlog_recover_put_hashq() argument
1361 trans->r_next = *q; in xlog_recover_put_hashq()
1362 *q = trans; in xlog_recover_put_hashq()
1377 xlog_recover_t *trans, in xlog_recover_add_to_cont_trans() argument
1385 item = trans->r_itemq; in xlog_recover_add_to_cont_trans()
1388 xlog_recover_add_item(&trans->r_itemq); in xlog_recover_add_to_cont_trans()
1389 ptr = (xfs_caddr_t) &trans->r_theader + in xlog_recover_add_to_cont_trans()
1421 xlog_recover_t *trans, in xlog_recover_add_to_trans() argument
1431 item = trans->r_itemq; in xlog_recover_add_to_trans()
1441 xlog_recover_add_item(&trans->r_itemq); in xlog_recover_add_to_trans()
[all …]

12