Home
last modified time | relevance | path

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

1234

/linux-4.19.296/fs/btrfs/
Dtransaction.c113 static noinline void switch_commit_roots(struct btrfs_transaction *trans) in switch_commit_roots() argument
115 struct btrfs_fs_info *fs_info = trans->fs_info; in switch_commit_roots()
119 list_for_each_entry_safe(root, tmp, &trans->switch_commits, in switch_commit_roots()
130 spin_lock(&trans->dropped_roots_lock); in switch_commit_roots()
131 while (!list_empty(&trans->dropped_roots)) { in switch_commit_roots()
132 root = list_first_entry(&trans->dropped_roots, in switch_commit_roots()
135 spin_unlock(&trans->dropped_roots_lock); in switch_commit_roots()
137 spin_lock(&trans->dropped_roots_lock); in switch_commit_roots()
139 spin_unlock(&trans->dropped_roots_lock); in switch_commit_roots()
143 static inline void extwriter_counter_inc(struct btrfs_transaction *trans, in extwriter_counter_inc() argument
[all …]
Dtree-log.h36 struct btrfs_trans_handle *trans) in btrfs_set_log_full_commit() argument
38 WRITE_ONCE(fs_info->last_trans_log_full_commit, trans->transid); in btrfs_set_log_full_commit()
42 struct btrfs_trans_handle *trans) in btrfs_need_log_full_commit() argument
45 trans->transid; in btrfs_need_log_full_commit()
48 int btrfs_sync_log(struct btrfs_trans_handle *trans,
50 int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root);
51 int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans,
54 int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
59 int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
63 int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans,
[all …]
Dfree-space-tree.c14 static int __add_block_group_free_space(struct btrfs_trans_handle *trans,
46 static int add_new_free_space_info(struct btrfs_trans_handle *trans, in add_new_free_space_info() argument
50 struct btrfs_root *root = trans->fs_info->free_space_root; in add_new_free_space_info()
60 ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*info)); in add_new_free_space_info()
78 search_free_space_info(struct btrfs_trans_handle *trans, in search_free_space_info() argument
91 ret = btrfs_search_slot(trans, root, &key, path, 0, cow); in search_free_space_info()
109 static int btrfs_search_prev_slot(struct btrfs_trans_handle *trans, in btrfs_search_prev_slot() argument
116 ret = btrfs_search_slot(trans, root, key, p, ins_len, cow); in btrfs_search_prev_slot()
179 int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans, in convert_free_space_to_bitmaps() argument
183 struct btrfs_fs_info *fs_info = trans->fs_info; in convert_free_space_to_bitmaps()
[all …]
Droot-tree.c118 int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root in btrfs_update_root() argument
134 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
144 btrfs_abort_transaction(trans, ret); in btrfs_update_root()
160 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
163 btrfs_abort_transaction(trans, ret); in btrfs_update_root()
167 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
169 btrfs_abort_transaction(trans, ret); in btrfs_update_root()
173 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
176 btrfs_abort_transaction(trans, ret); in btrfs_update_root()
197 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, in btrfs_insert_root() argument
[all …]
Dfree-space-tree.h21 int add_block_group_free_space(struct btrfs_trans_handle *trans,
23 int remove_block_group_free_space(struct btrfs_trans_handle *trans,
25 int add_to_free_space_tree(struct btrfs_trans_handle *trans,
27 int remove_from_free_space_tree(struct btrfs_trans_handle *trans,
32 search_free_space_info(struct btrfs_trans_handle *trans,
36 int __add_to_free_space_tree(struct btrfs_trans_handle *trans,
39 int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
42 int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
45 int convert_free_space_to_extents(struct btrfs_trans_handle *trans,
Dtree-log.c88 static int btrfs_log_inode(struct btrfs_trans_handle *trans,
94 static int link_to_fixup_dir(struct btrfs_trans_handle *trans,
97 static noinline int replay_dir_deletes(struct btrfs_trans_handle *trans,
131 static int start_log_trans(struct btrfs_trans_handle *trans, in start_log_trans() argument
141 if (btrfs_need_log_full_commit(fs_info, trans)) { in start_log_trans()
155 ret = btrfs_init_log_root_tree(trans, fs_info); in start_log_trans()
160 ret = btrfs_add_log_tree(trans, root); in start_log_trans()
272 struct btrfs_trans_handle *trans; member
332 static noinline int overwrite_item(struct btrfs_trans_handle *trans, in overwrite_item() argument
449 ret = btrfs_insert_empty_item(trans, root, path, in overwrite_item()
[all …]
Dtransaction.h150 static inline void btrfs_set_inode_last_trans(struct btrfs_trans_handle *trans, in btrfs_set_inode_last_trans() argument
154 BTRFS_I(inode)->last_trans = trans->transaction->transid; in btrfs_set_inode_last_trans()
164 static inline void btrfs_set_skip_qgroup(struct btrfs_trans_handle *trans, in btrfs_set_skip_qgroup() argument
169 delayed_refs = &trans->transaction->delayed_refs; in btrfs_set_skip_qgroup()
174 static inline void btrfs_clear_skip_qgroup(struct btrfs_trans_handle *trans) in btrfs_clear_skip_qgroup() argument
178 delayed_refs = &trans->transaction->delayed_refs; in btrfs_clear_skip_qgroup()
183 int btrfs_end_transaction(struct btrfs_trans_handle *trans);
201 int btrfs_commit_transaction(struct btrfs_trans_handle *trans);
202 int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans,
218 int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans);
[all …]
Dqgroup.c533 static int add_qgroup_relation_item(struct btrfs_trans_handle *trans, u64 src, in add_qgroup_relation_item() argument
537 struct btrfs_root *quota_root = trans->fs_info->quota_root; in add_qgroup_relation_item()
549 ret = btrfs_insert_empty_item(trans, quota_root, path, &key, 0); in add_qgroup_relation_item()
557 static int del_qgroup_relation_item(struct btrfs_trans_handle *trans, u64 src, in del_qgroup_relation_item() argument
561 struct btrfs_root *quota_root = trans->fs_info->quota_root; in del_qgroup_relation_item()
573 ret = btrfs_search_slot(trans, quota_root, &key, path, -1, 1); in del_qgroup_relation_item()
582 ret = btrfs_del_item(trans, quota_root, path); in del_qgroup_relation_item()
588 static int add_qgroup_item(struct btrfs_trans_handle *trans, in add_qgroup_item() argument
615 ret = btrfs_insert_empty_item(trans, quota_root, path, &key, in add_qgroup_item()
623 btrfs_set_qgroup_info_generation(leaf, qgroup_info, trans->transid); in add_qgroup_item()
[all …]
Dqgroup.h150 int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,
152 int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,
154 int btrfs_create_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid);
155 int btrfs_remove_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid);
156 int btrfs_limit_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid,
215 int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr,
224 int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans,
236 int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans,
239 int btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans, u64 bytenr,
242 int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans);
[all …]
Dextent-tree.c54 static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
62 static int alloc_reserved_file_extent(struct btrfs_trans_handle *trans,
66 static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans,
69 static int do_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags,
805 int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans, in btrfs_lookup_extent_info() argument
833 if (!trans) { in btrfs_lookup_extent_info()
846 ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0); in btrfs_lookup_extent_info()
873 if (trans) in btrfs_lookup_extent_info()
874 btrfs_abort_transaction(trans, ret); in btrfs_lookup_extent_info()
888 if (!trans) in btrfs_lookup_extent_info()
[all …]
Dinode.c158 static int btrfs_init_inode_security(struct btrfs_trans_handle *trans, in btrfs_init_inode_security() argument
164 err = btrfs_init_acl(trans, inode, dir); in btrfs_init_inode_security()
166 err = btrfs_xattr_security_init(trans, inode, dir, qstr); in btrfs_init_inode_security()
175 static int insert_inline_extent(struct btrfs_trans_handle *trans, in insert_inline_extent() argument
206 ret = btrfs_insert_empty_item(trans, root, path, &key, in insert_inline_extent()
214 btrfs_set_file_extent_generation(leaf, ei, trans->transid); in insert_inline_extent()
262 ret = btrfs_update_inode(trans, root, inode); in insert_inline_extent()
281 struct btrfs_trans_handle *trans; in cow_file_range_inline() local
309 trans = btrfs_join_transaction(root); in cow_file_range_inline()
310 if (IS_ERR(trans)) { in cow_file_range_inline()
[all …]
Ddelayed-inode.c540 static int btrfs_delayed_item_reserve_metadata(struct btrfs_trans_handle *trans, in btrfs_delayed_item_reserve_metadata() argument
550 if (!trans->bytes_reserved) in btrfs_delayed_item_reserve_metadata()
553 src_rsv = trans->block_rsv; in btrfs_delayed_item_reserve_metadata()
596 struct btrfs_trans_handle *trans, in btrfs_delayed_inode_reserve_metadata() argument
607 src_rsv = trans->block_rsv; in btrfs_delayed_inode_reserve_metadata()
621 if (!src_rsv || (!trans->bytes_reserved && in btrfs_delayed_inode_reserve_metadata()
798 static int btrfs_insert_delayed_item(struct btrfs_trans_handle *trans, in btrfs_insert_delayed_item() argument
809 ret = btrfs_insert_empty_item(trans, root, path, &delayed_item->key, in btrfs_insert_delayed_item()
831 static int btrfs_insert_delayed_items(struct btrfs_trans_handle *trans, in btrfs_insert_delayed_items() argument
845 ret = btrfs_insert_delayed_item(trans, root, path, curr); in btrfs_insert_delayed_items()
[all …]
Dinode-map.c395 struct btrfs_trans_handle *trans) in btrfs_save_ino_cache() argument
426 rsv = trans->block_rsv; in btrfs_save_ino_cache()
427 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_save_ino_cache()
429 num_bytes = trans->bytes_reserved; in btrfs_save_ino_cache()
437 trans->bytes_reserved = btrfs_calc_trans_metadata_size(fs_info, 10); in btrfs_save_ino_cache()
438 ret = btrfs_block_rsv_add(root, trans->block_rsv, in btrfs_save_ino_cache()
439 trans->bytes_reserved, in btrfs_save_ino_cache()
443 trace_btrfs_space_reservation(fs_info, "ino_cache", trans->transid, in btrfs_save_ino_cache()
444 trans->bytes_reserved, 1); in btrfs_save_ino_cache()
456 ret = create_free_ino_inode(root, trans, path); in btrfs_save_ino_cache()
[all …]
Ddelayed-ref.c200 int btrfs_delayed_ref_lock(struct btrfs_trans_handle *trans, in btrfs_delayed_ref_lock() argument
205 delayed_refs = &trans->transaction->delayed_refs; in btrfs_delayed_ref_lock()
224 static inline void drop_delayed_ref(struct btrfs_trans_handle *trans, in drop_delayed_ref() argument
239 static bool merge_ref(struct btrfs_trans_handle *trans, in merge_ref() argument
269 drop_delayed_ref(trans, delayed_refs, head, next); in merge_ref()
272 drop_delayed_ref(trans, delayed_refs, head, ref); in merge_ref()
286 void btrfs_merge_delayed_refs(struct btrfs_trans_handle *trans, in btrfs_merge_delayed_refs() argument
290 struct btrfs_fs_info *fs_info = trans->fs_info; in btrfs_merge_delayed_refs()
319 if (merge_ref(trans, delayed_refs, head, ref, seq)) in btrfs_merge_delayed_refs()
347 btrfs_select_ref_head(struct btrfs_trans_handle *trans) in btrfs_select_ref_head() argument
[all …]
Dxattr.c79 static int do_setxattr(struct btrfs_trans_handle *trans, in do_setxattr() argument
99 di = btrfs_lookup_xattr(trans, root, path, in do_setxattr()
106 ret = btrfs_delete_one_dir_name(trans, root, path, di); in do_setxattr()
131 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in do_setxattr()
194 ret = btrfs_delete_one_dir_name(trans, root, path, di); in do_setxattr()
223 int btrfs_setxattr(struct btrfs_trans_handle *trans, in btrfs_setxattr() argument
233 if (trans) in btrfs_setxattr()
234 return do_setxattr(trans, inode, name, value, size, flags); in btrfs_setxattr()
236 trans = btrfs_start_transaction(root, 2); in btrfs_setxattr()
237 if (IS_ERR(trans)) in btrfs_setxattr()
[all …]
Dorphan.c9 int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans, in btrfs_insert_orphan_item() argument
24 ret = btrfs_insert_empty_item(trans, root, path, &key, 0); in btrfs_insert_orphan_item()
30 int btrfs_del_orphan_item(struct btrfs_trans_handle *trans, in btrfs_del_orphan_item() argument
45 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_orphan_item()
53 ret = btrfs_del_item(trans, root, path); in btrfs_del_orphan_item()
Ddir-item.c19 *trans, in insert_with_overflow()
33 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); in insert_with_overflow()
55 int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans, in btrfs_insert_xattr_item() argument
77 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
88 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_xattr_item()
108 int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root in btrfs_insert_dir_item() argument
135 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
149 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_dir_item()
163 ret2 = btrfs_insert_delayed_dir_index(trans, name, name_len, dir, in btrfs_insert_dir_item()
179 struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, in btrfs_lookup_dir_item() argument
[all …]
/linux-4.19.296/fs/xfs/
Dxfs_attr_inactive.c37 struct xfs_trans **trans, in xfs_attr3_leaf_freextent() argument
80 bp = xfs_trans_get_buf(*trans, in xfs_attr3_leaf_freextent()
85 xfs_trans_binval(*trans, bp); in xfs_attr3_leaf_freextent()
89 error = xfs_trans_roll_inode(trans, dp); in xfs_attr3_leaf_freextent()
109 struct xfs_trans **trans, in xfs_attr3_leaf_inactive() argument
147 xfs_trans_brelse(*trans, bp); in xfs_attr3_leaf_inactive()
174 xfs_trans_brelse(*trans, bp); /* unlock for trans. in freextent() */ in xfs_attr3_leaf_inactive()
181 tmp = xfs_attr3_leaf_freextent(trans, dp, in xfs_attr3_leaf_inactive()
198 struct xfs_trans **trans, in xfs_attr3_node_inactive() argument
216 xfs_trans_brelse(*trans, bp); /* no locks for later trans */ in xfs_attr3_node_inactive()
[all …]
/linux-4.19.296/fs/btrfs/tests/
Dfree-space-tree-tests.c18 static int __check_free_space_extents(struct btrfs_trans_handle *trans, in __check_free_space_extents() argument
33 info = search_free_space_info(trans, fs_info, cache, path, 0); in __check_free_space_extents()
107 static int check_free_space_extents(struct btrfs_trans_handle *trans, in check_free_space_extents() argument
118 info = search_free_space_info(trans, fs_info, cache, path, 0); in check_free_space_extents()
127 ret = __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
134 ret = convert_free_space_to_extents(trans, cache, path); in check_free_space_extents()
140 ret = convert_free_space_to_bitmaps(trans, cache, path); in check_free_space_extents()
146 return __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
150 static int test_empty_block_group(struct btrfs_trans_handle *trans, in test_empty_block_group() argument
160 return check_free_space_extents(trans, fs_info, cache, path, in test_empty_block_group()
[all …]
Dqgroup-tests.c17 struct btrfs_trans_handle trans; in insert_normal_tree_ref() local
27 btrfs_init_dummy_trans(&trans, NULL); in insert_normal_tree_ref()
40 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size); in insert_normal_tree_ref()
70 struct btrfs_trans_handle trans; in add_tree_ref() local
77 btrfs_init_dummy_trans(&trans, NULL); in add_tree_ref()
90 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in add_tree_ref()
112 ret = btrfs_insert_empty_item(&trans, root, path, &key, 0); in add_tree_ref()
122 struct btrfs_trans_handle trans; in remove_extent_item() local
127 btrfs_init_dummy_trans(&trans, NULL); in remove_extent_item()
140 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1); in remove_extent_item()
[all …]
/linux-4.19.296/drivers/hid/
Dhid-apple.c172 const struct apple_key_translation *trans; in apple_find_translation() local
175 for (trans = table; trans->from; trans++) in apple_find_translation()
176 if (trans->from == from) in apple_find_translation()
177 return trans; in apple_find_translation()
186 const struct apple_key_translation *trans, *table; in hidinput_apple_event() local
205 trans = apple_find_translation (table, usage->code); in hidinput_apple_event()
207 if (trans) { in hidinput_apple_event()
208 if (test_bit(trans->from, input->key)) in hidinput_apple_event()
209 code = trans->from; in hidinput_apple_event()
210 else if (test_bit(trans->to, input->key)) in hidinput_apple_event()
[all …]
Dhid-icade.c170 const struct icade_key *trans; in icade_event() local
180 trans = icade_find_translation(usage->hid & HID_USAGE); in icade_event()
182 if (!trans) in icade_event()
186 trans->to, trans->press); in icade_event()
195 const struct icade_key *trans; in icade_input_mapping() local
198 trans = icade_find_translation(usage->hid & HID_USAGE); in icade_input_mapping()
200 if (!trans) in icade_input_mapping()
203 hid_map_usage(hi, usage, bit, max, EV_KEY, trans->to); in icade_input_mapping()
204 set_bit(trans->to, hi->input->keybit); in icade_input_mapping()
/linux-4.19.296/fs/xfs/libxfs/
Dxfs_attr.c212 xfs_trans_ichgtime(args->trans, dp, XFS_ICHGTIME_CHG); in xfs_attr_try_sf_addname()
215 xfs_trans_set_sync(args->trans); in xfs_attr_try_sf_addname()
217 error2 = xfs_trans_commit(args->trans); in xfs_attr_try_sf_addname()
218 args->trans = NULL; in xfs_attr_try_sf_addname()
269 xfs_trans_bhold(args->trans, leaf_bp); in xfs_attr_set_args()
270 error = xfs_defer_finish(&args->trans); in xfs_attr_set_args()
271 xfs_trans_bhold_release(args->trans, leaf_bp); in xfs_attr_set_args()
273 xfs_trans_brelse(args->trans, leaf_bp); in xfs_attr_set_args()
364 rsvd ? XFS_TRANS_RESERVE : 0, &args.trans); in xfs_attr_set()
369 error = xfs_trans_reserve_quota_nblks(args.trans, dp, args.total, 0, in xfs_attr_set()
[all …]
/linux-4.19.296/drivers/xen/xenbus/
Dxenbus_dev_frontend.c309 struct xenbus_transaction_holder *trans, *tmp; in xenbus_worker() local
320 list_for_each_entry_safe(trans, tmp, &u->transactions, list) { in xenbus_worker()
321 xenbus_transaction_end(trans->handle, 1); in xenbus_worker()
322 list_del(&trans->list); in xenbus_worker()
323 kfree(trans); in xenbus_worker()
354 struct xenbus_transaction_holder *trans; in xenbus_get_transaction() local
356 list_for_each_entry(trans, &u->transactions, list) in xenbus_get_transaction()
357 if (trans->handle.id == tx_id) in xenbus_get_transaction()
358 return trans; in xenbus_get_transaction()
366 struct xenbus_transaction_holder *trans = NULL; in xenbus_dev_queue_reply() local
[all …]
/linux-4.19.296/include/net/
Dswitchdev.h34 static inline bool switchdev_trans_ph_prepare(struct switchdev_trans *trans) in switchdev_trans_ph_prepare() argument
36 return trans && trans->ph_prepare; in switchdev_trans_ph_prepare()
39 static inline bool switchdev_trans_ph_commit(struct switchdev_trans *trans) in switchdev_trans_ph_commit() argument
41 return trans && !trans->ph_prepare; in switchdev_trans_ph_commit()
111 void switchdev_trans_item_enqueue(struct switchdev_trans *trans,
114 void *switchdev_trans_item_dequeue(struct switchdev_trans *trans);
134 struct switchdev_trans *trans);
137 struct switchdev_trans *trans);

1234