Lines Matching refs:ctxt
274 struct ocfs2_xattr_set_ctxt *ctxt);
279 struct ocfs2_xattr_set_ctxt *ctxt);
716 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_extend_allocation() argument
719 handle_t *handle = ctxt->handle; in ocfs2_xattr_extend_allocation()
742 ctxt->data_ac, in ocfs2_xattr_extend_allocation()
743 ctxt->meta_ac, in ocfs2_xattr_extend_allocation()
781 struct ocfs2_xattr_set_ctxt *ctxt) in __ocfs2_remove_xattr_range() argument
785 handle_t *handle = ctxt->handle; in __ocfs2_remove_xattr_range()
797 ret = ocfs2_remove_extent(handle, &et, cpos, len, ctxt->meta_ac, in __ocfs2_remove_xattr_range()
798 &ctxt->dealloc); in __ocfs2_remove_xattr_range()
811 len, ctxt->meta_ac, &ctxt->dealloc, 1); in __ocfs2_remove_xattr_range()
813 ret = ocfs2_cache_cluster_dealloc(&ctxt->dealloc, in __ocfs2_remove_xattr_range()
826 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_shrink_size() argument
852 ext_flags, ctxt); in ocfs2_xattr_shrink_size()
872 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_value_truncate() argument
884 vb, ctxt); in ocfs2_xattr_value_truncate()
888 vb, ctxt); in ocfs2_xattr_value_truncate()
1895 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_value_truncate() argument
1902 ctxt); in ocfs2_xa_value_truncate()
1914 access_rc = ocfs2_xa_journal_access(ctxt->handle, loc, in ocfs2_xa_value_truncate()
2005 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_remove() argument
2012 rc = ocfs2_xa_value_truncate(loc, 0, ctxt); in ocfs2_xa_remove()
2053 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_reuse_entry() argument
2075 rc = ocfs2_xa_value_truncate(loc, 0, ctxt); in ocfs2_xa_reuse_entry()
2085 ctxt); in ocfs2_xa_reuse_entry()
2115 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_prepare_entry() argument
2128 rc = ocfs2_xa_reuse_entry(loc, xi, ctxt); in ocfs2_xa_prepare_entry()
2136 rc = ocfs2_xa_value_truncate(loc, 0, ctxt); in ocfs2_xa_prepare_entry()
2160 rc = ocfs2_xa_value_truncate(loc, xi->xi_value_len, ctxt); in ocfs2_xa_prepare_entry()
2162 ctxt->set_abort = 1; in ocfs2_xa_prepare_entry()
2190 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_store_value() argument
2202 ctxt->handle, &vb, in ocfs2_xa_store_value()
2213 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_set() argument
2219 ret = ocfs2_xa_journal_access(ctxt->handle, loc, in ocfs2_xa_set()
2234 ret = ocfs2_xa_remove(loc, ctxt); in ocfs2_xa_set()
2238 ret = ocfs2_xa_prepare_entry(loc, xi, name_hash, ctxt); in ocfs2_xa_set()
2245 ret = ocfs2_xa_store_value(loc, xi, ctxt); in ocfs2_xa_set()
2250 ocfs2_xa_journal_dirty(ctxt->handle, loc); in ocfs2_xa_set()
2359 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, }; in ocfs2_remove_value_outside() local
2362 ocfs2_init_dealloc_ctxt(&ctxt.dealloc); in ocfs2_remove_value_outside()
2377 &ctxt.meta_ac, in ocfs2_remove_value_outside()
2380 ctxt.handle = ocfs2_start_trans(osb, ref_credits + in ocfs2_remove_value_outside()
2382 if (IS_ERR(ctxt.handle)) { in ocfs2_remove_value_outside()
2383 ret = PTR_ERR(ctxt.handle); in ocfs2_remove_value_outside()
2388 ret = ocfs2_xattr_value_truncate(inode, vb, 0, &ctxt); in ocfs2_remove_value_outside()
2390 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_remove_value_outside()
2391 if (ctxt.meta_ac) { in ocfs2_remove_value_outside()
2392 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_remove_value_outside()
2393 ctxt.meta_ac = NULL; in ocfs2_remove_value_outside()
2403 if (ctxt.meta_ac) in ocfs2_remove_value_outside()
2404 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_remove_value_outside()
2406 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_remove_value_outside()
2707 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_ibody_init() argument
2720 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), di_bh, in ocfs2_xattr_ibody_init()
2746 ocfs2_journal_dirty(ctxt->handle, di_bh); in ocfs2_xattr_ibody_init()
2761 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_ibody_set() argument
2772 ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt); in ocfs2_xattr_ibody_set()
2782 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_ibody_set()
2851 struct ocfs2_xattr_set_ctxt *ctxt, in ocfs2_create_xattr_block() argument
2863 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), in ocfs2_create_xattr_block()
2870 ret = ocfs2_claim_metadata(ctxt->handle, ctxt->meta_ac, 1, in ocfs2_create_xattr_block()
2887 ret = ocfs2_journal_access_xb(ctxt->handle, INODE_CACHE(inode), in ocfs2_create_xattr_block()
2899 xblk->xb_suballoc_slot = cpu_to_le16(ctxt->meta_ac->ac_alloc_slot); in ocfs2_create_xattr_block()
2915 ocfs2_journal_dirty(ctxt->handle, new_bh); in ocfs2_create_xattr_block()
2925 ocfs2_journal_dirty(ctxt->handle, inode_bh); in ocfs2_create_xattr_block()
2944 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_block_set() argument
2952 ret = ocfs2_create_xattr_block(inode, xs->inode_bh, ctxt, in ocfs2_xattr_block_set()
2972 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_block_set()
2975 else if ((ret != -ENOSPC) || ctxt->set_abort) in ocfs2_xattr_block_set()
2978 ret = ocfs2_xattr_create_index_block(inode, xs, ctxt); in ocfs2_xattr_block_set()
2985 ret = ocfs2_xattr_set_entry_index_block(inode, xi, xs, ctxt); in ocfs2_xattr_block_set()
3241 struct ocfs2_xattr_set_ctxt *ctxt, in ocfs2_init_xattr_set_ctxt() argument
3248 memset(ctxt, 0, sizeof(struct ocfs2_xattr_set_ctxt)); in ocfs2_init_xattr_set_ctxt()
3250 ocfs2_init_dealloc_ctxt(&ctxt->dealloc); in ocfs2_init_xattr_set_ctxt()
3265 &ctxt->meta_ac); in ocfs2_init_xattr_set_ctxt()
3273 ret = ocfs2_reserve_clusters(osb, clusters_add, &ctxt->data_ac); in ocfs2_init_xattr_set_ctxt()
3279 if (ctxt->meta_ac) { in ocfs2_init_xattr_set_ctxt()
3280 ocfs2_free_alloc_context(ctxt->meta_ac); in ocfs2_init_xattr_set_ctxt()
3281 ctxt->meta_ac = NULL; in ocfs2_init_xattr_set_ctxt()
3297 struct ocfs2_xattr_set_ctxt *ctxt) in __ocfs2_xattr_set_handle() argument
3304 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt); in __ocfs2_xattr_set_handle()
3306 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3309 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt); in __ocfs2_xattr_set_handle()
3334 ret = ocfs2_extend_trans(ctxt->handle, credits); in __ocfs2_xattr_set_handle()
3339 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3340 } else if ((ret == -ENOSPC) && !ctxt->set_abort) { in __ocfs2_xattr_set_handle()
3364 ret = ocfs2_extend_trans(ctxt->handle, credits); in __ocfs2_xattr_set_handle()
3374 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3398 ret = ocfs2_extend_trans(ctxt->handle, credits); in __ocfs2_xattr_set_handle()
3404 xis, ctxt); in __ocfs2_xattr_set_handle()
3411 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), in __ocfs2_xattr_set_handle()
3422 ocfs2_journal_dirty(ctxt->handle, xis->inode_bh); in __ocfs2_xattr_set_handle()
3463 struct ocfs2_xattr_set_ctxt ctxt = { in ocfs2_xattr_set_handle() local
3499 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); in ocfs2_xattr_set_handle()
3528 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, NULL, }; in ocfs2_xattr_set() local
3620 &xbs, &ctxt, ref_meta, &credits); in ocfs2_xattr_set()
3628 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_xattr_set()
3629 if (IS_ERR(ctxt.handle)) { in ocfs2_xattr_set()
3630 ret = PTR_ERR(ctxt.handle); in ocfs2_xattr_set()
3635 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); in ocfs2_xattr_set()
3636 ocfs2_update_inode_fsync_trans(ctxt.handle, inode, 0); in ocfs2_xattr_set()
3638 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_xattr_set()
3641 if (ctxt.data_ac) in ocfs2_xattr_set()
3642 ocfs2_free_alloc_context(ctxt.data_ac); in ocfs2_xattr_set()
3643 if (ctxt.meta_ac) in ocfs2_xattr_set()
3644 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_xattr_set()
3645 if (ocfs2_dealloc_has_cluster(&ctxt.dealloc)) in ocfs2_xattr_set()
3647 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_xattr_set()
4268 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_create_index_block() argument
4273 handle_t *handle = ctxt->handle; in ocfs2_xattr_create_index_block()
4301 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, in ocfs2_xattr_create_index_block()
5096 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_add_new_xattr_cluster() argument
5103 handle_t *handle = ctxt->handle; in ocfs2_add_new_xattr_cluster()
5121 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, 1, in ocfs2_add_new_xattr_cluster()
5166 num_bits, 0, ctxt->meta_ac); in ocfs2_add_new_xattr_cluster()
5266 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_add_new_xattr_bucket() argument
5318 ctxt); in ocfs2_add_new_xattr_bucket()
5327 ctxt->handle, in ocfs2_add_new_xattr_bucket()
5352 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_bucket_value_truncate() argument
5390 ret = ocfs2_xattr_value_truncate(inode, &vb, len, ctxt); in ocfs2_xattr_bucket_value_truncate()
5396 ret = ocfs2_xattr_bucket_journal_access(ctxt->handle, bucket, in ocfs2_xattr_bucket_value_truncate()
5405 ocfs2_xattr_bucket_journal_dirty(ctxt->handle, bucket); in ocfs2_xattr_bucket_value_truncate()
5541 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_set_entry_bucket() argument
5550 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_set_entry_bucket()
5561 ret = ocfs2_defrag_xattr_bucket(inode, ctxt->handle, in ocfs2_xattr_set_entry_bucket()
5568 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_set_entry_bucket()
5584 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_set_entry_index_block() argument
5590 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt); in ocfs2_xattr_set_entry_index_block()
5617 ctxt); in ocfs2_xattr_set_entry_index_block()
5639 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt); in ocfs2_xattr_set_entry_index_block()
5656 struct ocfs2_xattr_set_ctxt ctxt = {NULL, NULL,}; in ocfs2_delete_xattr_in_bucket() local
5663 ocfs2_init_dealloc_ctxt(&ctxt.dealloc); in ocfs2_delete_xattr_in_bucket()
5680 &ctxt.meta_ac, in ocfs2_delete_xattr_in_bucket()
5683 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_delete_xattr_in_bucket()
5684 if (IS_ERR(ctxt.handle)) { in ocfs2_delete_xattr_in_bucket()
5685 ret = PTR_ERR(ctxt.handle); in ocfs2_delete_xattr_in_bucket()
5691 i, 0, &ctxt); in ocfs2_delete_xattr_in_bucket()
5693 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_delete_xattr_in_bucket()
5694 if (ctxt.meta_ac) { in ocfs2_delete_xattr_in_bucket()
5695 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_delete_xattr_in_bucket()
5696 ctxt.meta_ac = NULL; in ocfs2_delete_xattr_in_bucket()
5704 if (ctxt.meta_ac) in ocfs2_delete_xattr_in_bucket()
5705 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_delete_xattr_in_bucket()
5707 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_delete_xattr_in_bucket()
6547 struct ocfs2_xattr_set_ctxt ctxt; in ocfs2_create_empty_xattr_block() local
6549 memset(&ctxt, 0, sizeof(ctxt)); in ocfs2_create_empty_xattr_block()
6550 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac); in ocfs2_create_empty_xattr_block()
6556 ctxt.handle = ocfs2_start_trans(osb, OCFS2_XATTR_BLOCK_CREATE_CREDITS); in ocfs2_create_empty_xattr_block()
6557 if (IS_ERR(ctxt.handle)) { in ocfs2_create_empty_xattr_block()
6558 ret = PTR_ERR(ctxt.handle); in ocfs2_create_empty_xattr_block()
6565 ret = ocfs2_create_xattr_block(inode, fe_bh, &ctxt, indexed, in ocfs2_create_empty_xattr_block()
6570 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_create_empty_xattr_block()
6572 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_create_empty_xattr_block()