Lines Matching refs:ac
53 struct ocfs2_alloc_context **ac,
59 struct ocfs2_alloc_context *ac);
618 struct ocfs2_alloc_context *ac) in ocfs2_reserve_local_alloc_bits() argument
625 BUG_ON(!ac); in ocfs2_reserve_local_alloc_bits()
693 ac->ac_inode = local_alloc_inode; in ocfs2_reserve_local_alloc_bits()
695 ac->ac_alloc_slot = osb->slot_num; in ocfs2_reserve_local_alloc_bits()
696 ac->ac_which = OCFS2_AC_USE_LOCAL; in ocfs2_reserve_local_alloc_bits()
698 ac->ac_bh = osb->local_alloc_bh; in ocfs2_reserve_local_alloc_bits()
707 (unsigned long long)ac->ac_max_block, in ocfs2_reserve_local_alloc_bits()
717 struct ocfs2_alloc_context *ac, in ocfs2_claim_local_alloc_bits() argument
728 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); in ocfs2_claim_local_alloc_bits()
730 local_alloc_inode = ac->ac_inode; in ocfs2_claim_local_alloc_bits()
735 ac->ac_resv); in ocfs2_claim_local_alloc_bits()
756 ocfs2_resmap_claimed_bits(&osb->osb_la_resmap, ac->ac_resv, start, in ocfs2_claim_local_alloc_bits()
773 struct ocfs2_alloc_context *ac, in ocfs2_free_local_alloc_bits() argument
784 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); in ocfs2_free_local_alloc_bits()
786 local_alloc_inode = ac->ac_inode; in ocfs2_free_local_alloc_bits()
1099 struct ocfs2_alloc_context **ac, in ocfs2_local_alloc_reserve_for_window() argument
1105 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL); in ocfs2_local_alloc_reserve_for_window()
1106 if (!(*ac)) { in ocfs2_local_alloc_reserve_for_window()
1113 (*ac)->ac_bits_wanted = osb->local_alloc_bits; in ocfs2_local_alloc_reserve_for_window()
1114 status = ocfs2_reserve_cluster_bitmap_bits(osb, *ac); in ocfs2_local_alloc_reserve_for_window()
1120 ocfs2_free_ac_resource(*ac); in ocfs2_local_alloc_reserve_for_window()
1121 memset(*ac, 0, sizeof(struct ocfs2_alloc_context)); in ocfs2_local_alloc_reserve_for_window()
1129 *bitmap_inode = (*ac)->ac_inode; in ocfs2_local_alloc_reserve_for_window()
1131 *bitmap_bh = (*ac)->ac_bh; in ocfs2_local_alloc_reserve_for_window()
1135 if ((status < 0) && *ac) { in ocfs2_local_alloc_reserve_for_window()
1136 ocfs2_free_alloc_context(*ac); in ocfs2_local_alloc_reserve_for_window()
1137 *ac = NULL; in ocfs2_local_alloc_reserve_for_window()
1150 struct ocfs2_alloc_context *ac) in ocfs2_local_alloc_new_window() argument
1167 ac->ac_last_group = osb->la_last_gd; in ocfs2_local_alloc_new_window()
1172 status = ocfs2_claim_clusters(handle, ac, osb->local_alloc_bits, in ocfs2_local_alloc_new_window()
1185 ac->ac_bits_wanted = osb->local_alloc_bits; in ocfs2_local_alloc_new_window()
1186 status = ocfs2_claim_clusters(handle, ac, in ocfs2_local_alloc_new_window()
1209 osb->la_last_gd = ac->ac_last_group; in ocfs2_local_alloc_new_window()
1245 struct ocfs2_alloc_context *ac = NULL; in ocfs2_local_alloc_slide_window() local
1251 &ac, in ocfs2_local_alloc_slide_window()
1301 status = ocfs2_local_alloc_new_window(osb, handle, ac); in ocfs2_local_alloc_slide_window()
1319 if (ac) in ocfs2_local_alloc_slide_window()
1320 ocfs2_free_alloc_context(ac); in ocfs2_local_alloc_slide_window()