Lines Matching refs:ctxt
260 struct ocfs2_xattr_set_ctxt *ctxt);
265 struct ocfs2_xattr_set_ctxt *ctxt);
698 struct ocfs2_xattr_set_ctxt *ctxt)
701 handle_t *handle = ctxt->handle;
724 ctxt->data_ac,
725 ctxt->meta_ac,
763 struct ocfs2_xattr_set_ctxt *ctxt)
767 handle_t *handle = ctxt->handle;
779 ret = ocfs2_remove_extent(handle, &et, cpos, len, ctxt->meta_ac,
780 &ctxt->dealloc);
793 len, ctxt->meta_ac, &ctxt->dealloc, 1);
795 ret = ocfs2_cache_cluster_dealloc(&ctxt->dealloc,
808 struct ocfs2_xattr_set_ctxt *ctxt)
834 ext_flags, ctxt);
854 struct ocfs2_xattr_set_ctxt *ctxt)
866 vb, ctxt);
870 vb, ctxt);
1900 struct ocfs2_xattr_set_ctxt *ctxt)
1907 ctxt);
1919 access_rc = ocfs2_xa_journal_access(ctxt->handle, loc,
2010 struct ocfs2_xattr_set_ctxt *ctxt)
2017 rc = ocfs2_xa_value_truncate(loc, 0, ctxt);
2058 struct ocfs2_xattr_set_ctxt *ctxt)
2080 rc = ocfs2_xa_value_truncate(loc, 0, ctxt);
2090 ctxt);
2120 struct ocfs2_xattr_set_ctxt *ctxt)
2133 rc = ocfs2_xa_reuse_entry(loc, xi, ctxt);
2141 rc = ocfs2_xa_value_truncate(loc, 0, ctxt);
2165 rc = ocfs2_xa_value_truncate(loc, xi->xi_value_len, ctxt);
2167 ctxt->set_abort = 1;
2195 struct ocfs2_xattr_set_ctxt *ctxt)
2207 ctxt->handle, &vb,
2218 struct ocfs2_xattr_set_ctxt *ctxt)
2224 ret = ocfs2_xa_journal_access(ctxt->handle, loc,
2239 ret = ocfs2_xa_remove(loc, ctxt);
2243 ret = ocfs2_xa_prepare_entry(loc, xi, name_hash, ctxt);
2250 ret = ocfs2_xa_store_value(loc, xi, ctxt);
2255 ocfs2_xa_journal_dirty(ctxt->handle, loc);
2364 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, };
2367 ocfs2_init_dealloc_ctxt(&ctxt.dealloc);
2382 &ctxt.meta_ac,
2385 ctxt.handle = ocfs2_start_trans(osb, ref_credits +
2387 if (IS_ERR(ctxt.handle)) {
2388 ret = PTR_ERR(ctxt.handle);
2393 ret = ocfs2_xattr_value_truncate(inode, vb, 0, &ctxt);
2395 ocfs2_commit_trans(osb, ctxt.handle);
2396 if (ctxt.meta_ac) {
2397 ocfs2_free_alloc_context(ctxt.meta_ac);
2398 ctxt.meta_ac = NULL;
2408 if (ctxt.meta_ac)
2409 ocfs2_free_alloc_context(ctxt.meta_ac);
2411 ocfs2_run_deallocs(osb, &ctxt.dealloc);
2712 struct ocfs2_xattr_set_ctxt *ctxt)
2725 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), di_bh,
2751 ocfs2_journal_dirty(ctxt->handle, di_bh);
2766 struct ocfs2_xattr_set_ctxt *ctxt)
2777 ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt);
2787 ret = ocfs2_xa_set(&loc, xi, ctxt);
2856 struct ocfs2_xattr_set_ctxt *ctxt,
2868 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode),
2875 ret = ocfs2_claim_metadata(ctxt->handle, ctxt->meta_ac, 1,
2892 ret = ocfs2_journal_access_xb(ctxt->handle, INODE_CACHE(inode),
2904 xblk->xb_suballoc_slot = cpu_to_le16(ctxt->meta_ac->ac_alloc_slot);
2920 ocfs2_journal_dirty(ctxt->handle, new_bh);
2930 ocfs2_journal_dirty(ctxt->handle, inode_bh);
2949 struct ocfs2_xattr_set_ctxt *ctxt)
2957 ret = ocfs2_create_xattr_block(inode, xs->inode_bh, ctxt,
2977 ret = ocfs2_xa_set(&loc, xi, ctxt);
2980 else if ((ret != -ENOSPC) || ctxt->set_abort)
2983 ret = ocfs2_xattr_create_index_block(inode, xs, ctxt);
2990 ret = ocfs2_xattr_set_entry_index_block(inode, xi, xs, ctxt);
3246 struct ocfs2_xattr_set_ctxt *ctxt,
3253 memset(ctxt, 0, sizeof(struct ocfs2_xattr_set_ctxt));
3255 ocfs2_init_dealloc_ctxt(&ctxt->dealloc);
3270 &ctxt->meta_ac);
3278 ret = ocfs2_reserve_clusters(osb, clusters_add, &ctxt->data_ac);
3284 if (ctxt->meta_ac) {
3285 ocfs2_free_alloc_context(ctxt->meta_ac);
3286 ctxt->meta_ac = NULL;
3290 * We cannot have an error and a non null ctxt->data_ac.
3302 struct ocfs2_xattr_set_ctxt *ctxt)
3309 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt);
3311 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt);
3314 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt);
3339 ret = ocfs2_extend_trans(ctxt->handle, credits);
3344 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt);
3345 } else if ((ret == -ENOSPC) && !ctxt->set_abort) {
3369 ret = ocfs2_extend_trans(ctxt->handle, credits);
3379 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt);
3403 ret = ocfs2_extend_trans(ctxt->handle, credits);
3409 xis, ctxt);
3416 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode),
3427 ocfs2_journal_dirty(ctxt->handle, xis->inode_bh);
3468 struct ocfs2_xattr_set_ctxt ctxt = {
3504 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt);
3533 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, NULL, };
3627 &xbs, &ctxt, ref_meta, &credits);
3635 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits);
3636 if (IS_ERR(ctxt.handle)) {
3637 ret = PTR_ERR(ctxt.handle);
3642 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt);
3643 ocfs2_update_inode_fsync_trans(ctxt.handle, inode, 0);
3645 ocfs2_commit_trans(osb, ctxt.handle);
3648 if (ctxt.data_ac)
3649 ocfs2_free_alloc_context(ctxt.data_ac);
3650 if (ctxt.meta_ac)
3651 ocfs2_free_alloc_context(ctxt.meta_ac);
3652 if (ocfs2_dealloc_has_cluster(&ctxt.dealloc))
3654 ocfs2_run_deallocs(osb, &ctxt.dealloc);
4268 struct ocfs2_xattr_set_ctxt *ctxt)
4273 handle_t *handle = ctxt->handle;
4301 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac,
5096 struct ocfs2_xattr_set_ctxt *ctxt)
5103 handle_t *handle = ctxt->handle;
5121 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, 1,
5166 num_bits, 0, ctxt->meta_ac);
5266 struct ocfs2_xattr_set_ctxt *ctxt)
5318 ctxt);
5327 ctxt->handle,
5352 struct ocfs2_xattr_set_ctxt *ctxt)
5390 ret = ocfs2_xattr_value_truncate(inode, &vb, len, ctxt);
5396 ret = ocfs2_xattr_bucket_journal_access(ctxt->handle, bucket,
5405 ocfs2_xattr_bucket_journal_dirty(ctxt->handle, bucket);
5541 struct ocfs2_xattr_set_ctxt *ctxt)
5550 ret = ocfs2_xa_set(&loc, xi, ctxt);
5561 ret = ocfs2_defrag_xattr_bucket(inode, ctxt->handle,
5568 ret = ocfs2_xa_set(&loc, xi, ctxt);
5584 struct ocfs2_xattr_set_ctxt *ctxt)
5590 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt);
5617 ctxt);
5639 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt);
5656 struct ocfs2_xattr_set_ctxt ctxt = {NULL, NULL,};
5663 ocfs2_init_dealloc_ctxt(&ctxt.dealloc);
5680 &ctxt.meta_ac,
5683 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits);
5684 if (IS_ERR(ctxt.handle)) {
5685 ret = PTR_ERR(ctxt.handle);
5691 i, 0, &ctxt);
5693 ocfs2_commit_trans(osb, ctxt.handle);
5694 if (ctxt.meta_ac) {
5695 ocfs2_free_alloc_context(ctxt.meta_ac);
5696 ctxt.meta_ac = NULL;
5704 if (ctxt.meta_ac)
5705 ocfs2_free_alloc_context(ctxt.meta_ac);
5707 ocfs2_run_deallocs(osb, &ctxt.dealloc);
6547 struct ocfs2_xattr_set_ctxt ctxt;
6549 memset(&ctxt, 0, sizeof(ctxt));
6550 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac);
6556 ctxt.handle = ocfs2_start_trans(osb, OCFS2_XATTR_BLOCK_CREATE_CREDITS);
6557 if (IS_ERR(ctxt.handle)) {
6558 ret = PTR_ERR(ctxt.handle);
6565 ret = ocfs2_create_xattr_block(inode, fe_bh, &ctxt, indexed,
6570 ocfs2_commit_trans(osb, ctxt.handle);
6572 ocfs2_free_alloc_context(ctxt.meta_ac);