Lines Matching refs:ctxt

266 					  struct ocfs2_xattr_set_ctxt *ctxt);
271 struct ocfs2_xattr_set_ctxt *ctxt);
704 struct ocfs2_xattr_set_ctxt *ctxt)
707 handle_t *handle = ctxt->handle;
730 ctxt->data_ac,
731 ctxt->meta_ac,
769 struct ocfs2_xattr_set_ctxt *ctxt)
773 handle_t *handle = ctxt->handle;
785 ret = ocfs2_remove_extent(handle, &et, cpos, len, ctxt->meta_ac,
786 &ctxt->dealloc);
799 len, ctxt->meta_ac, &ctxt->dealloc, 1);
801 ret = ocfs2_cache_cluster_dealloc(&ctxt->dealloc,
814 struct ocfs2_xattr_set_ctxt *ctxt)
840 ext_flags, ctxt);
860 struct ocfs2_xattr_set_ctxt *ctxt)
872 vb, ctxt);
876 vb, ctxt);
1906 struct ocfs2_xattr_set_ctxt *ctxt)
1913 ctxt);
1925 access_rc = ocfs2_xa_journal_access(ctxt->handle, loc,
2016 struct ocfs2_xattr_set_ctxt *ctxt)
2023 rc = ocfs2_xa_value_truncate(loc, 0, ctxt);
2064 struct ocfs2_xattr_set_ctxt *ctxt)
2086 rc = ocfs2_xa_value_truncate(loc, 0, ctxt);
2096 ctxt);
2126 struct ocfs2_xattr_set_ctxt *ctxt)
2139 rc = ocfs2_xa_reuse_entry(loc, xi, ctxt);
2147 rc = ocfs2_xa_value_truncate(loc, 0, ctxt);
2171 rc = ocfs2_xa_value_truncate(loc, xi->xi_value_len, ctxt);
2173 ctxt->set_abort = 1;
2201 struct ocfs2_xattr_set_ctxt *ctxt)
2213 ctxt->handle, &vb,
2224 struct ocfs2_xattr_set_ctxt *ctxt)
2230 ret = ocfs2_xa_journal_access(ctxt->handle, loc,
2245 ret = ocfs2_xa_remove(loc, ctxt);
2249 ret = ocfs2_xa_prepare_entry(loc, xi, name_hash, ctxt);
2256 ret = ocfs2_xa_store_value(loc, xi, ctxt);
2261 ocfs2_xa_journal_dirty(ctxt->handle, loc);
2370 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, };
2373 ocfs2_init_dealloc_ctxt(&ctxt.dealloc);
2388 &ctxt.meta_ac,
2391 ctxt.handle = ocfs2_start_trans(osb, ref_credits +
2393 if (IS_ERR(ctxt.handle)) {
2394 ret = PTR_ERR(ctxt.handle);
2399 ret = ocfs2_xattr_value_truncate(inode, vb, 0, &ctxt);
2401 ocfs2_commit_trans(osb, ctxt.handle);
2402 if (ctxt.meta_ac) {
2403 ocfs2_free_alloc_context(ctxt.meta_ac);
2404 ctxt.meta_ac = NULL;
2414 if (ctxt.meta_ac)
2415 ocfs2_free_alloc_context(ctxt.meta_ac);
2417 ocfs2_run_deallocs(osb, &ctxt.dealloc);
2718 struct ocfs2_xattr_set_ctxt *ctxt)
2731 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), di_bh,
2757 ocfs2_journal_dirty(ctxt->handle, di_bh);
2772 struct ocfs2_xattr_set_ctxt *ctxt)
2783 ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt);
2793 ret = ocfs2_xa_set(&loc, xi, ctxt);
2862 struct ocfs2_xattr_set_ctxt *ctxt,
2874 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode),
2881 ret = ocfs2_claim_metadata(ctxt->handle, ctxt->meta_ac, 1,
2898 ret = ocfs2_journal_access_xb(ctxt->handle, INODE_CACHE(inode),
2910 xblk->xb_suballoc_slot = cpu_to_le16(ctxt->meta_ac->ac_alloc_slot);
2926 ocfs2_journal_dirty(ctxt->handle, new_bh);
2936 ocfs2_journal_dirty(ctxt->handle, inode_bh);
2955 struct ocfs2_xattr_set_ctxt *ctxt)
2963 ret = ocfs2_create_xattr_block(inode, xs->inode_bh, ctxt,
2983 ret = ocfs2_xa_set(&loc, xi, ctxt);
2986 else if ((ret != -ENOSPC) || ctxt->set_abort)
2989 ret = ocfs2_xattr_create_index_block(inode, xs, ctxt);
2996 ret = ocfs2_xattr_set_entry_index_block(inode, xi, xs, ctxt);
3252 struct ocfs2_xattr_set_ctxt *ctxt,
3259 memset(ctxt, 0, sizeof(struct ocfs2_xattr_set_ctxt));
3261 ocfs2_init_dealloc_ctxt(&ctxt->dealloc);
3276 &ctxt->meta_ac);
3284 ret = ocfs2_reserve_clusters(osb, clusters_add, &ctxt->data_ac);
3290 if (ctxt->meta_ac) {
3291 ocfs2_free_alloc_context(ctxt->meta_ac);
3292 ctxt->meta_ac = NULL;
3296 * We cannot have an error and a non null ctxt->data_ac.
3308 struct ocfs2_xattr_set_ctxt *ctxt)
3315 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt);
3317 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt);
3320 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt);
3345 ret = ocfs2_extend_trans(ctxt->handle, credits);
3350 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt);
3351 } else if ((ret == -ENOSPC) && !ctxt->set_abort) {
3375 ret = ocfs2_extend_trans(ctxt->handle, credits);
3385 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt);
3409 ret = ocfs2_extend_trans(ctxt->handle, credits);
3415 xis, ctxt);
3422 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode),
3433 ocfs2_journal_dirty(ctxt->handle, xis->inode_bh);
3474 struct ocfs2_xattr_set_ctxt ctxt = {
3510 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt);
3539 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, NULL, };
3633 &xbs, &ctxt, ref_meta, &credits);
3641 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits);
3642 if (IS_ERR(ctxt.handle)) {
3643 ret = PTR_ERR(ctxt.handle);
3648 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt);
3649 ocfs2_update_inode_fsync_trans(ctxt.handle, inode, 0);
3651 ocfs2_commit_trans(osb, ctxt.handle);
3654 if (ctxt.data_ac)
3655 ocfs2_free_alloc_context(ctxt.data_ac);
3656 if (ctxt.meta_ac)
3657 ocfs2_free_alloc_context(ctxt.meta_ac);
3658 if (ocfs2_dealloc_has_cluster(&ctxt.dealloc))
3660 ocfs2_run_deallocs(osb, &ctxt.dealloc);
4274 struct ocfs2_xattr_set_ctxt *ctxt)
4279 handle_t *handle = ctxt->handle;
4307 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac,
5102 struct ocfs2_xattr_set_ctxt *ctxt)
5109 handle_t *handle = ctxt->handle;
5127 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, 1,
5172 num_bits, 0, ctxt->meta_ac);
5272 struct ocfs2_xattr_set_ctxt *ctxt)
5324 ctxt);
5333 ctxt->handle,
5358 struct ocfs2_xattr_set_ctxt *ctxt)
5396 ret = ocfs2_xattr_value_truncate(inode, &vb, len, ctxt);
5402 ret = ocfs2_xattr_bucket_journal_access(ctxt->handle, bucket,
5411 ocfs2_xattr_bucket_journal_dirty(ctxt->handle, bucket);
5547 struct ocfs2_xattr_set_ctxt *ctxt)
5556 ret = ocfs2_xa_set(&loc, xi, ctxt);
5567 ret = ocfs2_defrag_xattr_bucket(inode, ctxt->handle,
5574 ret = ocfs2_xa_set(&loc, xi, ctxt);
5590 struct ocfs2_xattr_set_ctxt *ctxt)
5596 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt);
5623 ctxt);
5645 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt);
5662 struct ocfs2_xattr_set_ctxt ctxt = {NULL, NULL,};
5669 ocfs2_init_dealloc_ctxt(&ctxt.dealloc);
5686 &ctxt.meta_ac,
5689 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits);
5690 if (IS_ERR(ctxt.handle)) {
5691 ret = PTR_ERR(ctxt.handle);
5697 i, 0, &ctxt);
5699 ocfs2_commit_trans(osb, ctxt.handle);
5700 if (ctxt.meta_ac) {
5701 ocfs2_free_alloc_context(ctxt.meta_ac);
5702 ctxt.meta_ac = NULL;
5710 if (ctxt.meta_ac)
5711 ocfs2_free_alloc_context(ctxt.meta_ac);
5713 ocfs2_run_deallocs(osb, &ctxt.dealloc);
6553 struct ocfs2_xattr_set_ctxt ctxt;
6555 memset(&ctxt, 0, sizeof(ctxt));
6556 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac);
6562 ctxt.handle = ocfs2_start_trans(osb, OCFS2_XATTR_BLOCK_CREATE_CREDITS);
6563 if (IS_ERR(ctxt.handle)) {
6564 ret = PTR_ERR(ctxt.handle);
6571 ret = ocfs2_create_xattr_block(inode, fe_bh, &ctxt, indexed,
6576 ocfs2_commit_trans(osb, ctxt.handle);
6578 ocfs2_free_alloc_context(ctxt.meta_ac);