• Home
  • Raw
  • Download

Lines Matching refs:alloc

37 static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc);
40 struct ocfs2_dinode *alloc,
44 static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc);
48 struct ocfs2_dinode *alloc,
273 struct ocfs2_dinode *alloc = NULL; in ocfs2_load_local_alloc() local
307 alloc = (struct ocfs2_dinode *) alloc_bh->b_data; in ocfs2_load_local_alloc()
308 la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_load_local_alloc()
310 if (!(le32_to_cpu(alloc->i_flags) & in ocfs2_load_local_alloc()
327 num_used = ocfs2_local_alloc_count_bits(alloc); in ocfs2_load_local_alloc()
332 || alloc->id1.bitmap1.i_used in ocfs2_load_local_alloc()
333 || alloc->id1.bitmap1.i_total in ocfs2_load_local_alloc()
338 num_used, le32_to_cpu(alloc->id1.bitmap1.i_used), in ocfs2_load_local_alloc()
339 le32_to_cpu(alloc->id1.bitmap1.i_total), in ocfs2_load_local_alloc()
340 OCFS2_LOCAL_ALLOC(alloc)->la_bm_off); in ocfs2_load_local_alloc()
377 struct ocfs2_dinode *alloc = NULL; in ocfs2_shutdown_local_alloc() local
426 alloc = (struct ocfs2_dinode *) bh->b_data; in ocfs2_shutdown_local_alloc()
428 alloc_copy = kmemdup(alloc, bh->b_size, GFP_NOFS); in ocfs2_shutdown_local_alloc()
441 ocfs2_clear_local_alloc(alloc); in ocfs2_shutdown_local_alloc()
485 struct ocfs2_dinode *alloc; in ocfs2_begin_local_alloc_recovery() local
516 alloc = (struct ocfs2_dinode *) alloc_bh->b_data; in ocfs2_begin_local_alloc_recovery()
517 ocfs2_clear_local_alloc(alloc); in ocfs2_begin_local_alloc_recovery()
519 ocfs2_compute_meta_ecc(osb->sb, alloc_bh->b_data, &alloc->i_check); in ocfs2_begin_local_alloc_recovery()
549 struct ocfs2_dinode *alloc) in ocfs2_complete_local_alloc_recovery() argument
584 status = ocfs2_sync_local_to_main(osb, handle, alloc, in ocfs2_complete_local_alloc_recovery()
621 struct ocfs2_dinode *alloc; in ocfs2_reserve_local_alloc_bits() local
652 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; in ocfs2_reserve_local_alloc_bits()
655 if (le32_to_cpu(alloc->id1.bitmap1.i_used) != in ocfs2_reserve_local_alloc_bits()
656 ocfs2_local_alloc_count_bits(alloc)) { in ocfs2_reserve_local_alloc_bits()
658 (unsigned long long)le64_to_cpu(alloc->i_blkno), in ocfs2_reserve_local_alloc_bits()
659 le32_to_cpu(alloc->id1.bitmap1.i_used), in ocfs2_reserve_local_alloc_bits()
660 ocfs2_local_alloc_count_bits(alloc)); in ocfs2_reserve_local_alloc_bits()
665 free_bits = le32_to_cpu(alloc->id1.bitmap1.i_total) - in ocfs2_reserve_local_alloc_bits()
666 le32_to_cpu(alloc->id1.bitmap1.i_used); in ocfs2_reserve_local_alloc_bits()
687 free_bits = le32_to_cpu(alloc->id1.bitmap1.i_total) - in ocfs2_reserve_local_alloc_bits()
688 le32_to_cpu(alloc->id1.bitmap1.i_used); in ocfs2_reserve_local_alloc_bits()
725 struct ocfs2_dinode *alloc; in ocfs2_claim_local_alloc_bits() local
731 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; in ocfs2_claim_local_alloc_bits()
732 la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_claim_local_alloc_bits()
734 start = ocfs2_local_alloc_find_clear_bits(osb, alloc, &bits_wanted, in ocfs2_claim_local_alloc_bits()
762 le32_add_cpu(&alloc->id1.bitmap1.i_used, *num_bits); in ocfs2_claim_local_alloc_bits()
781 struct ocfs2_dinode *alloc; in ocfs2_free_local_alloc_bits() local
787 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; in ocfs2_free_local_alloc_bits()
788 la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_free_local_alloc_bits()
806 le32_add_cpu(&alloc->id1.bitmap1.i_used, -num_bits); in ocfs2_free_local_alloc_bits()
813 static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc) in ocfs2_local_alloc_count_bits() argument
816 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_local_alloc_count_bits()
825 struct ocfs2_dinode *alloc, in ocfs2_local_alloc_find_clear_bits() argument
835 if (!alloc->id1.bitmap1.i_total) { in ocfs2_local_alloc_find_clear_bits()
864 bitmap = OCFS2_LOCAL_ALLOC(alloc)->la_bitmap; in ocfs2_local_alloc_find_clear_bits()
867 left = le32_to_cpu(alloc->id1.bitmap1.i_total); in ocfs2_local_alloc_find_clear_bits()
906 le32_to_cpu(alloc->id1.bitmap1.i_total), in ocfs2_local_alloc_find_clear_bits()
912 static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc) in ocfs2_clear_local_alloc() argument
914 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_clear_local_alloc()
917 alloc->id1.bitmap1.i_total = 0; in ocfs2_clear_local_alloc()
918 alloc->id1.bitmap1.i_used = 0; in ocfs2_clear_local_alloc()
951 struct ocfs2_dinode *alloc, in ocfs2_sync_local_to_main() argument
960 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_sync_local_to_main()
963 le32_to_cpu(alloc->id1.bitmap1.i_total), in ocfs2_sync_local_to_main()
964 le32_to_cpu(alloc->id1.bitmap1.i_used)); in ocfs2_sync_local_to_main()
966 if (!alloc->id1.bitmap1.i_total) { in ocfs2_sync_local_to_main()
970 if (le32_to_cpu(alloc->id1.bitmap1.i_used) == in ocfs2_sync_local_to_main()
971 le32_to_cpu(alloc->id1.bitmap1.i_total)) { in ocfs2_sync_local_to_main()
979 left = le32_to_cpu(alloc->id1.bitmap1.i_total); in ocfs2_sync_local_to_main()
1154 struct ocfs2_dinode *alloc = NULL; in ocfs2_local_alloc_new_window() local
1157 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; in ocfs2_local_alloc_new_window()
1158 la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_local_alloc_new_window()
1161 le32_to_cpu(alloc->id1.bitmap1.i_total), in ocfs2_local_alloc_new_window()
1212 alloc->id1.bitmap1.i_total = cpu_to_le32(cluster_count); in ocfs2_local_alloc_new_window()
1217 alloc->id1.bitmap1.i_used = 0; in ocfs2_local_alloc_new_window()
1218 memset(OCFS2_LOCAL_ALLOC(alloc)->la_bitmap, 0, in ocfs2_local_alloc_new_window()
1222 OCFS2_LOCAL_ALLOC(alloc)->la_bitmap); in ocfs2_local_alloc_new_window()
1225 OCFS2_LOCAL_ALLOC(alloc)->la_bm_off, in ocfs2_local_alloc_new_window()
1226 le32_to_cpu(alloc->id1.bitmap1.i_total)); in ocfs2_local_alloc_new_window()
1243 struct ocfs2_dinode *alloc; in ocfs2_local_alloc_slide_window() local
1268 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; in ocfs2_local_alloc_slide_window()
1275 alloc_copy = kmemdup(alloc, osb->local_alloc_bh->b_size, GFP_NOFS); in ocfs2_local_alloc_slide_window()
1291 ocfs2_clear_local_alloc(alloc); in ocfs2_local_alloc_slide_window()