Lines Matching defs:trans

112 	 * We are often under a trans handle at this point, so we need to make
164 struct btrfs_trans_handle *trans,
178 ret = btrfs_insert_empty_inode(trans, root, path, ino);
188 btrfs_set_inode_generation(leaf, inode_item, trans->transid);
196 btrfs_set_inode_transid(leaf, inode_item, trans->transid);
198 btrfs_mark_buffer_dirty(trans, leaf);
204 ret = btrfs_insert_empty_item(trans, root, path, &key,
216 btrfs_mark_buffer_dirty(trans, leaf);
222 int create_free_space_inode(struct btrfs_trans_handle *trans,
229 ret = btrfs_get_free_objectid(trans->fs_info->tree_root, &ino);
233 return __create_free_space_inode(trans->fs_info->tree_root, trans, path,
242 int btrfs_remove_free_space_inode(struct btrfs_trans_handle *trans,
261 ret = btrfs_orphan_add(trans, BTRFS_I(inode));
282 ret = btrfs_search_slot(trans, trans->fs_info->tree_root, &key, path,
289 ret = btrfs_del_item(trans, trans->fs_info->tree_root, path);
295 int btrfs_truncate_free_space_cache(struct btrfs_trans_handle *trans,
320 mutex_lock(&trans->transaction->cache_write_mutex);
324 btrfs_wait_cache_io(trans, block_group, path);
348 ret = btrfs_truncate_inode_items(trans, root, &control);
357 ret = btrfs_update_inode(trans, root, inode);
361 mutex_unlock(&trans->transaction->cache_write_mutex);
363 btrfs_abort_transaction(trans, ret);
1145 update_cache_item(struct btrfs_trans_handle *trans,
1160 ret = btrfs_search_slot(trans, root, &key, path, 0, 1);
1182 BTRFS_I(inode)->generation = trans->transid;
1187 btrfs_set_free_space_generation(leaf, header, trans->transid);
1188 btrfs_mark_buffer_dirty(trans, leaf);
1198 struct btrfs_trans_handle *trans,
1217 unpin = &trans->transaction->pinned_extents;
1296 struct btrfs_trans_handle *trans,
1313 ret = update_cache_item(trans, root, inode, path, offset,
1324 btrfs_update_inode(trans, root, BTRFS_I(inode));
1328 spin_lock(&trans->transaction->dirty_bgs_lock);
1344 spin_unlock(&trans->transaction->dirty_bgs_lock);
1353 int btrfs_wait_cache_io(struct btrfs_trans_handle *trans,
1357 return __btrfs_wait_cache_io(block_group->fs_info->tree_root, trans,
1370 * @trans: the trans handle
1380 struct btrfs_trans_handle *trans)
1420 io_ctl_set_generation(io_ctl, trans->transid);
1439 ret = write_pinned_extent_entries(trans, block_group, io_ctl, &entries);
1509 btrfs_update_inode(trans, root, BTRFS_I(inode));
1515 int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
1519 struct btrfs_fs_info *fs_info = trans->fs_info;
1536 block_group, &block_group->io_ctl, trans);
4099 struct btrfs_trans_handle *trans)
4110 ret = btrfs_remove_free_space_inode(trans, NULL, block_group);
4121 struct btrfs_trans_handle *trans;
4132 trans = btrfs_start_transaction(fs_info->tree_root, 0);
4133 if (IS_ERR(trans))
4134 return PTR_ERR(trans);
4138 ret = cleanup_free_space_cache_v1(fs_info, trans);
4140 btrfs_abort_transaction(trans, ret);
4141 btrfs_end_transaction(trans);
4146 ret = btrfs_commit_transaction(trans);