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