Lines Matching refs:ctxt

274 					  struct ocfs2_xattr_set_ctxt *ctxt);
279 struct ocfs2_xattr_set_ctxt *ctxt);
710 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_extend_allocation() argument
713 handle_t *handle = ctxt->handle; in ocfs2_xattr_extend_allocation()
736 ctxt->data_ac, in ocfs2_xattr_extend_allocation()
737 ctxt->meta_ac, in ocfs2_xattr_extend_allocation()
775 struct ocfs2_xattr_set_ctxt *ctxt) in __ocfs2_remove_xattr_range() argument
779 handle_t *handle = ctxt->handle; in __ocfs2_remove_xattr_range()
791 ret = ocfs2_remove_extent(handle, &et, cpos, len, ctxt->meta_ac, in __ocfs2_remove_xattr_range()
792 &ctxt->dealloc); in __ocfs2_remove_xattr_range()
805 len, ctxt->meta_ac, &ctxt->dealloc, 1); in __ocfs2_remove_xattr_range()
807 ret = ocfs2_cache_cluster_dealloc(&ctxt->dealloc, in __ocfs2_remove_xattr_range()
820 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_shrink_size() argument
846 ext_flags, ctxt); in ocfs2_xattr_shrink_size()
866 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_value_truncate() argument
878 vb, ctxt); in ocfs2_xattr_value_truncate()
882 vb, ctxt); in ocfs2_xattr_value_truncate()
1889 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_value_truncate() argument
1896 ctxt); in ocfs2_xa_value_truncate()
1908 access_rc = ocfs2_xa_journal_access(ctxt->handle, loc, in ocfs2_xa_value_truncate()
1999 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_remove() argument
2006 rc = ocfs2_xa_value_truncate(loc, 0, ctxt); in ocfs2_xa_remove()
2047 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_reuse_entry() argument
2069 rc = ocfs2_xa_value_truncate(loc, 0, ctxt); in ocfs2_xa_reuse_entry()
2079 ctxt); in ocfs2_xa_reuse_entry()
2109 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_prepare_entry() argument
2122 rc = ocfs2_xa_reuse_entry(loc, xi, ctxt); in ocfs2_xa_prepare_entry()
2130 rc = ocfs2_xa_value_truncate(loc, 0, ctxt); in ocfs2_xa_prepare_entry()
2154 rc = ocfs2_xa_value_truncate(loc, xi->xi_value_len, ctxt); in ocfs2_xa_prepare_entry()
2156 ctxt->set_abort = 1; in ocfs2_xa_prepare_entry()
2184 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_store_value() argument
2196 ctxt->handle, &vb, in ocfs2_xa_store_value()
2207 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xa_set() argument
2213 ret = ocfs2_xa_journal_access(ctxt->handle, loc, in ocfs2_xa_set()
2228 ret = ocfs2_xa_remove(loc, ctxt); in ocfs2_xa_set()
2232 ret = ocfs2_xa_prepare_entry(loc, xi, name_hash, ctxt); in ocfs2_xa_set()
2239 ret = ocfs2_xa_store_value(loc, xi, ctxt); in ocfs2_xa_set()
2244 ocfs2_xa_journal_dirty(ctxt->handle, loc); in ocfs2_xa_set()
2353 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, }; in ocfs2_remove_value_outside() local
2356 ocfs2_init_dealloc_ctxt(&ctxt.dealloc); in ocfs2_remove_value_outside()
2371 &ctxt.meta_ac, in ocfs2_remove_value_outside()
2374 ctxt.handle = ocfs2_start_trans(osb, ref_credits + in ocfs2_remove_value_outside()
2376 if (IS_ERR(ctxt.handle)) { in ocfs2_remove_value_outside()
2377 ret = PTR_ERR(ctxt.handle); in ocfs2_remove_value_outside()
2382 ret = ocfs2_xattr_value_truncate(inode, vb, 0, &ctxt); in ocfs2_remove_value_outside()
2384 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_remove_value_outside()
2385 if (ctxt.meta_ac) { in ocfs2_remove_value_outside()
2386 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_remove_value_outside()
2387 ctxt.meta_ac = NULL; in ocfs2_remove_value_outside()
2397 if (ctxt.meta_ac) in ocfs2_remove_value_outside()
2398 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_remove_value_outside()
2400 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_remove_value_outside()
2701 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_ibody_init() argument
2714 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), di_bh, in ocfs2_xattr_ibody_init()
2740 ocfs2_journal_dirty(ctxt->handle, di_bh); in ocfs2_xattr_ibody_init()
2755 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_ibody_set() argument
2766 ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt); in ocfs2_xattr_ibody_set()
2776 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_ibody_set()
2845 struct ocfs2_xattr_set_ctxt *ctxt, in ocfs2_create_xattr_block() argument
2857 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), in ocfs2_create_xattr_block()
2864 ret = ocfs2_claim_metadata(ctxt->handle, ctxt->meta_ac, 1, in ocfs2_create_xattr_block()
2881 ret = ocfs2_journal_access_xb(ctxt->handle, INODE_CACHE(inode), in ocfs2_create_xattr_block()
2893 xblk->xb_suballoc_slot = cpu_to_le16(ctxt->meta_ac->ac_alloc_slot); in ocfs2_create_xattr_block()
2909 ocfs2_journal_dirty(ctxt->handle, new_bh); in ocfs2_create_xattr_block()
2919 ocfs2_journal_dirty(ctxt->handle, inode_bh); in ocfs2_create_xattr_block()
2938 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_block_set() argument
2946 ret = ocfs2_create_xattr_block(inode, xs->inode_bh, ctxt, in ocfs2_xattr_block_set()
2966 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_block_set()
2969 else if ((ret != -ENOSPC) || ctxt->set_abort) in ocfs2_xattr_block_set()
2972 ret = ocfs2_xattr_create_index_block(inode, xs, ctxt); in ocfs2_xattr_block_set()
2979 ret = ocfs2_xattr_set_entry_index_block(inode, xi, xs, ctxt); in ocfs2_xattr_block_set()
3235 struct ocfs2_xattr_set_ctxt *ctxt, in ocfs2_init_xattr_set_ctxt() argument
3242 memset(ctxt, 0, sizeof(struct ocfs2_xattr_set_ctxt)); in ocfs2_init_xattr_set_ctxt()
3244 ocfs2_init_dealloc_ctxt(&ctxt->dealloc); in ocfs2_init_xattr_set_ctxt()
3259 &ctxt->meta_ac); in ocfs2_init_xattr_set_ctxt()
3267 ret = ocfs2_reserve_clusters(osb, clusters_add, &ctxt->data_ac); in ocfs2_init_xattr_set_ctxt()
3273 if (ctxt->meta_ac) { in ocfs2_init_xattr_set_ctxt()
3274 ocfs2_free_alloc_context(ctxt->meta_ac); in ocfs2_init_xattr_set_ctxt()
3275 ctxt->meta_ac = NULL; in ocfs2_init_xattr_set_ctxt()
3291 struct ocfs2_xattr_set_ctxt *ctxt) in __ocfs2_xattr_set_handle() argument
3298 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt); in __ocfs2_xattr_set_handle()
3300 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3303 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt); in __ocfs2_xattr_set_handle()
3328 ret = ocfs2_extend_trans(ctxt->handle, credits); in __ocfs2_xattr_set_handle()
3333 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3334 } else if ((ret == -ENOSPC) && !ctxt->set_abort) { in __ocfs2_xattr_set_handle()
3358 ret = ocfs2_extend_trans(ctxt->handle, credits); in __ocfs2_xattr_set_handle()
3368 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3392 ret = ocfs2_extend_trans(ctxt->handle, credits); in __ocfs2_xattr_set_handle()
3398 xis, ctxt); in __ocfs2_xattr_set_handle()
3405 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode), in __ocfs2_xattr_set_handle()
3416 ocfs2_journal_dirty(ctxt->handle, xis->inode_bh); in __ocfs2_xattr_set_handle()
3457 struct ocfs2_xattr_set_ctxt ctxt = { in ocfs2_xattr_set_handle() local
3493 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); in ocfs2_xattr_set_handle()
3522 struct ocfs2_xattr_set_ctxt ctxt = { NULL, NULL, NULL, }; in ocfs2_xattr_set() local
3614 &xbs, &ctxt, ref_meta, &credits); in ocfs2_xattr_set()
3622 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_xattr_set()
3623 if (IS_ERR(ctxt.handle)) { in ocfs2_xattr_set()
3624 ret = PTR_ERR(ctxt.handle); in ocfs2_xattr_set()
3629 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); in ocfs2_xattr_set()
3630 ocfs2_update_inode_fsync_trans(ctxt.handle, inode, 0); in ocfs2_xattr_set()
3632 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_xattr_set()
3635 if (ctxt.data_ac) in ocfs2_xattr_set()
3636 ocfs2_free_alloc_context(ctxt.data_ac); in ocfs2_xattr_set()
3637 if (ctxt.meta_ac) in ocfs2_xattr_set()
3638 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_xattr_set()
3639 if (ocfs2_dealloc_has_cluster(&ctxt.dealloc)) in ocfs2_xattr_set()
3641 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_xattr_set()
4260 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_create_index_block() argument
4265 handle_t *handle = ctxt->handle; in ocfs2_xattr_create_index_block()
4293 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, in ocfs2_xattr_create_index_block()
5088 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_add_new_xattr_cluster() argument
5095 handle_t *handle = ctxt->handle; in ocfs2_add_new_xattr_cluster()
5113 ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, 1, in ocfs2_add_new_xattr_cluster()
5158 num_bits, 0, ctxt->meta_ac); in ocfs2_add_new_xattr_cluster()
5258 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_add_new_xattr_bucket() argument
5310 ctxt); in ocfs2_add_new_xattr_bucket()
5319 ctxt->handle, in ocfs2_add_new_xattr_bucket()
5344 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_bucket_value_truncate() argument
5382 ret = ocfs2_xattr_value_truncate(inode, &vb, len, ctxt); in ocfs2_xattr_bucket_value_truncate()
5388 ret = ocfs2_xattr_bucket_journal_access(ctxt->handle, bucket, in ocfs2_xattr_bucket_value_truncate()
5397 ocfs2_xattr_bucket_journal_dirty(ctxt->handle, bucket); in ocfs2_xattr_bucket_value_truncate()
5533 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_set_entry_bucket() argument
5542 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_set_entry_bucket()
5553 ret = ocfs2_defrag_xattr_bucket(inode, ctxt->handle, in ocfs2_xattr_set_entry_bucket()
5560 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_set_entry_bucket()
5576 struct ocfs2_xattr_set_ctxt *ctxt) in ocfs2_xattr_set_entry_index_block() argument
5582 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt); in ocfs2_xattr_set_entry_index_block()
5609 ctxt); in ocfs2_xattr_set_entry_index_block()
5631 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt); in ocfs2_xattr_set_entry_index_block()
5648 struct ocfs2_xattr_set_ctxt ctxt = {NULL, NULL,}; in ocfs2_delete_xattr_in_bucket() local
5655 ocfs2_init_dealloc_ctxt(&ctxt.dealloc); in ocfs2_delete_xattr_in_bucket()
5672 &ctxt.meta_ac, in ocfs2_delete_xattr_in_bucket()
5675 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_delete_xattr_in_bucket()
5676 if (IS_ERR(ctxt.handle)) { in ocfs2_delete_xattr_in_bucket()
5677 ret = PTR_ERR(ctxt.handle); in ocfs2_delete_xattr_in_bucket()
5683 i, 0, &ctxt); in ocfs2_delete_xattr_in_bucket()
5685 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_delete_xattr_in_bucket()
5686 if (ctxt.meta_ac) { in ocfs2_delete_xattr_in_bucket()
5687 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_delete_xattr_in_bucket()
5688 ctxt.meta_ac = NULL; in ocfs2_delete_xattr_in_bucket()
5696 if (ctxt.meta_ac) in ocfs2_delete_xattr_in_bucket()
5697 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_delete_xattr_in_bucket()
5699 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_delete_xattr_in_bucket()
6539 struct ocfs2_xattr_set_ctxt ctxt; in ocfs2_create_empty_xattr_block() local
6541 memset(&ctxt, 0, sizeof(ctxt)); in ocfs2_create_empty_xattr_block()
6542 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac); in ocfs2_create_empty_xattr_block()
6548 ctxt.handle = ocfs2_start_trans(osb, OCFS2_XATTR_BLOCK_CREATE_CREDITS); in ocfs2_create_empty_xattr_block()
6549 if (IS_ERR(ctxt.handle)) { in ocfs2_create_empty_xattr_block()
6550 ret = PTR_ERR(ctxt.handle); in ocfs2_create_empty_xattr_block()
6557 ret = ocfs2_create_xattr_block(inode, fe_bh, &ctxt, indexed, in ocfs2_create_empty_xattr_block()
6562 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_create_empty_xattr_block()
6564 ocfs2_free_alloc_context(ctxt.meta_ac); in ocfs2_create_empty_xattr_block()