Lines Matching refs:prealloc

476 		       struct extent_state *prealloc, u64 split)  in split_state()  argument
482 prealloc->start = orig->start; in split_state()
483 prealloc->end = split - 1; in split_state()
484 prealloc->state = orig->state; in split_state()
487 node = tree_insert(&tree->state, &orig->rb_node, prealloc->end, in split_state()
488 &prealloc->rb_node, NULL, NULL); in split_state()
490 free_extent_state(prealloc); in split_state()
549 alloc_extent_state_atomic(struct extent_state *prealloc) in alloc_extent_state_atomic() argument
551 if (!prealloc) in alloc_extent_state_atomic()
552 prealloc = alloc_extent_state(GFP_ATOMIC); in alloc_extent_state_atomic()
554 return prealloc; in alloc_extent_state_atomic()
584 struct extent_state *prealloc = NULL; in __clear_extent_bit() local
602 if (!prealloc && gfpflags_allow_blocking(mask)) { in __clear_extent_bit()
610 prealloc = alloc_extent_state(mask); in __clear_extent_bit()
669 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
670 BUG_ON(!prealloc); in __clear_extent_bit()
671 err = split_state(tree, state, prealloc, start); in __clear_extent_bit()
675 prealloc = NULL; in __clear_extent_bit()
692 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
693 BUG_ON(!prealloc); in __clear_extent_bit()
694 err = split_state(tree, state, prealloc, end + 1); in __clear_extent_bit()
701 clear_state_bit(tree, prealloc, &bits, wake, changeset); in __clear_extent_bit()
703 prealloc = NULL; in __clear_extent_bit()
725 if (prealloc) in __clear_extent_bit()
726 free_extent_state(prealloc); in __clear_extent_bit()
850 struct extent_state *prealloc = NULL; in __set_extent_bit() local
862 if (!prealloc && gfpflags_allow_blocking(mask)) { in __set_extent_bit()
870 prealloc = alloc_extent_state(mask); in __set_extent_bit()
888 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
889 BUG_ON(!prealloc); in __set_extent_bit()
890 err = insert_state(tree, prealloc, start, end, in __set_extent_bit()
895 cache_state(prealloc, cached_state); in __set_extent_bit()
896 prealloc = NULL; in __set_extent_bit()
953 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
954 BUG_ON(!prealloc); in __set_extent_bit()
955 err = split_state(tree, state, prealloc, start); in __set_extent_bit()
959 prealloc = NULL; in __set_extent_bit()
990 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
991 BUG_ON(!prealloc); in __set_extent_bit()
997 err = insert_state(tree, prealloc, start, this_end, in __set_extent_bit()
1002 cache_state(prealloc, cached_state); in __set_extent_bit()
1003 prealloc = NULL; in __set_extent_bit()
1020 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1021 BUG_ON(!prealloc); in __set_extent_bit()
1022 err = split_state(tree, state, prealloc, end + 1); in __set_extent_bit()
1026 set_state_bits(tree, prealloc, &bits, changeset); in __set_extent_bit()
1027 cache_state(prealloc, cached_state); in __set_extent_bit()
1028 merge_state(tree, prealloc); in __set_extent_bit()
1029 prealloc = NULL; in __set_extent_bit()
1043 if (prealloc) in __set_extent_bit()
1044 free_extent_state(prealloc); in __set_extent_bit()
1082 struct extent_state *prealloc = NULL; in convert_extent_bit() local
1094 if (!prealloc) { in convert_extent_bit()
1102 prealloc = alloc_extent_state(GFP_NOFS); in convert_extent_bit()
1103 if (!prealloc && !first_iteration) in convert_extent_bit()
1123 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1124 if (!prealloc) { in convert_extent_bit()
1128 err = insert_state(tree, prealloc, start, end, in convert_extent_bit()
1132 cache_state(prealloc, cached_state); in convert_extent_bit()
1133 prealloc = NULL; in convert_extent_bit()
1177 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1178 if (!prealloc) { in convert_extent_bit()
1182 err = split_state(tree, state, prealloc, start); in convert_extent_bit()
1185 prealloc = NULL; in convert_extent_bit()
1216 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1217 if (!prealloc) { in convert_extent_bit()
1226 err = insert_state(tree, prealloc, start, this_end, in convert_extent_bit()
1230 cache_state(prealloc, cached_state); in convert_extent_bit()
1231 prealloc = NULL; in convert_extent_bit()
1242 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1243 if (!prealloc) { in convert_extent_bit()
1248 err = split_state(tree, state, prealloc, end + 1); in convert_extent_bit()
1252 set_state_bits(tree, prealloc, &bits, NULL); in convert_extent_bit()
1253 cache_state(prealloc, cached_state); in convert_extent_bit()
1254 clear_state_bit(tree, prealloc, &clear_bits, 0, NULL); in convert_extent_bit()
1255 prealloc = NULL; in convert_extent_bit()
1269 if (prealloc) in convert_extent_bit()
1270 free_extent_state(prealloc); in convert_extent_bit()