Lines Matching +full:1 +full:ac

51 						struct ocfs2_alloc_context **ac,
57 struct ocfs2_alloc_context *ac);
115 * than 16K and also 1k blocksize with 4k cluster size. in ocfs2_la_default_mb()
158 gd_mult = gd_mult >> 1; in ocfs2_la_default_mb()
190 if (requested_mb == -1) { in ocfs2_la_set_sizes()
261 ret = 1; in ocfs2_alloc_should_use_local()
284 osb->local_alloc_bits, (osb->bitmap_cpg - 1)); in ocfs2_load_local_alloc()
410 status = ocfs2_inode_lock(main_bm_inode, &main_bm_bh, 1); in ocfs2_shutdown_local_alloc()
458 ocfs2_inode_unlock(main_bm_inode, 1); in ocfs2_shutdown_local_alloc()
566 status = ocfs2_inode_lock(main_bm_inode, &main_bm_bh, 1); in ocfs2_complete_local_alloc_recovery()
581 handle->h_sync = 1; in ocfs2_complete_local_alloc_recovery()
591 ocfs2_inode_unlock(main_bm_inode, 1); in ocfs2_complete_local_alloc_recovery()
617 struct ocfs2_alloc_context *ac) in ocfs2_reserve_local_alloc_bits() argument
624 BUG_ON(!ac); in ocfs2_reserve_local_alloc_bits()
692 ac->ac_inode = local_alloc_inode; in ocfs2_reserve_local_alloc_bits()
694 ac->ac_alloc_slot = osb->slot_num; in ocfs2_reserve_local_alloc_bits()
695 ac->ac_which = OCFS2_AC_USE_LOCAL; in ocfs2_reserve_local_alloc_bits()
697 ac->ac_bh = osb->local_alloc_bh; in ocfs2_reserve_local_alloc_bits()
706 (unsigned long long)ac->ac_max_block, in ocfs2_reserve_local_alloc_bits()
716 struct ocfs2_alloc_context *ac, in ocfs2_claim_local_alloc_bits() argument
727 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); in ocfs2_claim_local_alloc_bits()
729 local_alloc_inode = ac->ac_inode; in ocfs2_claim_local_alloc_bits()
734 ac->ac_resv); in ocfs2_claim_local_alloc_bits()
735 if (start == -1) { in ocfs2_claim_local_alloc_bits()
755 ocfs2_resmap_claimed_bits(&osb->osb_la_resmap, ac->ac_resv, start, in ocfs2_claim_local_alloc_bits()
772 struct ocfs2_alloc_context *ac, in ocfs2_free_local_alloc_bits() argument
783 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); in ocfs2_free_local_alloc_bits()
785 local_alloc_inode = ac->ac_inode; in ocfs2_free_local_alloc_bits()
835 bitoff = -1; in ocfs2_local_alloc_find_clear_bits()
840 local_resv = 1; in ocfs2_local_alloc_find_clear_bits()
877 numfound = 1; in ocfs2_local_alloc_find_clear_bits()
878 startoff = bitoff+1; in ocfs2_local_alloc_find_clear_bits()
892 bitoff = -1; in ocfs2_local_alloc_find_clear_bits()
974 while (1) { in ocfs2_sync_local_to_main()
1003 count = 1; in ocfs2_sync_local_to_main()
1004 start = bit_off + 1; in ocfs2_sync_local_to_main()
1057 bits = osb->local_alloc_bits >> 1; in ocfs2_recalc_la_window()
1058 if (bits > ocfs2_megabytes_to_clusters(osb->sb, 1)) { in ocfs2_recalc_la_window()
1093 struct ocfs2_alloc_context **ac, in ocfs2_local_alloc_reserve_for_window() argument
1099 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL); in ocfs2_local_alloc_reserve_for_window()
1100 if (!(*ac)) { in ocfs2_local_alloc_reserve_for_window()
1107 (*ac)->ac_bits_wanted = osb->local_alloc_bits; in ocfs2_local_alloc_reserve_for_window()
1108 status = ocfs2_reserve_cluster_bitmap_bits(osb, *ac); in ocfs2_local_alloc_reserve_for_window()
1114 ocfs2_free_ac_resource(*ac); in ocfs2_local_alloc_reserve_for_window()
1115 memset(*ac, 0, sizeof(struct ocfs2_alloc_context)); in ocfs2_local_alloc_reserve_for_window()
1123 *bitmap_inode = (*ac)->ac_inode; in ocfs2_local_alloc_reserve_for_window()
1125 *bitmap_bh = (*ac)->ac_bh; in ocfs2_local_alloc_reserve_for_window()
1129 if ((status < 0) && *ac) { in ocfs2_local_alloc_reserve_for_window()
1130 ocfs2_free_alloc_context(*ac); in ocfs2_local_alloc_reserve_for_window()
1131 *ac = NULL; in ocfs2_local_alloc_reserve_for_window()
1144 struct ocfs2_alloc_context *ac) in ocfs2_local_alloc_new_window() argument
1161 ac->ac_last_group = osb->la_last_gd; in ocfs2_local_alloc_new_window()
1166 status = ocfs2_claim_clusters(handle, ac, osb->local_alloc_bits, in ocfs2_local_alloc_new_window()
1179 ac->ac_bits_wanted = osb->local_alloc_bits; in ocfs2_local_alloc_new_window()
1180 status = ocfs2_claim_clusters(handle, ac, in ocfs2_local_alloc_new_window()
1203 osb->la_last_gd = ac->ac_last_group; in ocfs2_local_alloc_new_window()
1239 struct ocfs2_alloc_context *ac = NULL; in ocfs2_local_alloc_slide_window() local
1245 &ac, in ocfs2_local_alloc_slide_window()
1295 status = ocfs2_local_alloc_new_window(osb, handle, ac); in ocfs2_local_alloc_slide_window()
1313 if (ac) in ocfs2_local_alloc_slide_window()
1314 ocfs2_free_alloc_context(ac); in ocfs2_local_alloc_slide_window()