Lines Matching refs:prealloc

496 		       struct extent_state *prealloc, u64 split)  in split_state()  argument
502 prealloc->start = orig->start; in split_state()
503 prealloc->end = split - 1; in split_state()
504 prealloc->state = orig->state; in split_state()
507 node = tree_insert(&tree->state, &orig->rb_node, prealloc->end, in split_state()
508 &prealloc->rb_node, NULL, NULL); in split_state()
510 free_extent_state(prealloc); in split_state()
567 alloc_extent_state_atomic(struct extent_state *prealloc) in alloc_extent_state_atomic() argument
569 if (!prealloc) in alloc_extent_state_atomic()
570 prealloc = alloc_extent_state(GFP_ATOMIC); in alloc_extent_state_atomic()
572 return prealloc; in alloc_extent_state_atomic()
601 struct extent_state *prealloc = NULL; in __clear_extent_bit() local
619 if (!prealloc && gfpflags_allow_blocking(mask)) { in __clear_extent_bit()
627 prealloc = alloc_extent_state(mask); in __clear_extent_bit()
686 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
687 BUG_ON(!prealloc); in __clear_extent_bit()
688 err = split_state(tree, state, prealloc, start); in __clear_extent_bit()
692 prealloc = NULL; in __clear_extent_bit()
709 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
710 BUG_ON(!prealloc); in __clear_extent_bit()
711 err = split_state(tree, state, prealloc, end + 1); in __clear_extent_bit()
718 clear_state_bit(tree, prealloc, &bits, wake, changeset); in __clear_extent_bit()
720 prealloc = NULL; in __clear_extent_bit()
735 if (prealloc) in __clear_extent_bit()
736 free_extent_state(prealloc); in __clear_extent_bit()
865 struct extent_state *prealloc = NULL; in __set_extent_bit() local
877 if (!prealloc && gfpflags_allow_blocking(mask)) { in __set_extent_bit()
878 prealloc = alloc_extent_state(mask); in __set_extent_bit()
879 BUG_ON(!prealloc); in __set_extent_bit()
897 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
898 BUG_ON(!prealloc); in __set_extent_bit()
899 err = insert_state(tree, prealloc, start, end, in __set_extent_bit()
904 cache_state(prealloc, cached_state); in __set_extent_bit()
905 prealloc = NULL; in __set_extent_bit()
962 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
963 BUG_ON(!prealloc); in __set_extent_bit()
964 err = split_state(tree, state, prealloc, start); in __set_extent_bit()
968 prealloc = NULL; in __set_extent_bit()
999 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1000 BUG_ON(!prealloc); in __set_extent_bit()
1006 err = insert_state(tree, prealloc, start, this_end, in __set_extent_bit()
1011 cache_state(prealloc, cached_state); in __set_extent_bit()
1012 prealloc = NULL; in __set_extent_bit()
1029 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1030 BUG_ON(!prealloc); in __set_extent_bit()
1031 err = split_state(tree, state, prealloc, end + 1); in __set_extent_bit()
1035 set_state_bits(tree, prealloc, &bits, changeset); in __set_extent_bit()
1036 cache_state(prealloc, cached_state); in __set_extent_bit()
1037 merge_state(tree, prealloc); in __set_extent_bit()
1038 prealloc = NULL; in __set_extent_bit()
1046 if (prealloc) in __set_extent_bit()
1047 free_extent_state(prealloc); in __set_extent_bit()
1091 struct extent_state *prealloc = NULL; in convert_extent_bit() local
1103 if (!prealloc && gfpflags_allow_blocking(mask)) { in convert_extent_bit()
1111 prealloc = alloc_extent_state(mask); in convert_extent_bit()
1112 if (!prealloc && !first_iteration) in convert_extent_bit()
1132 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1133 if (!prealloc) { in convert_extent_bit()
1137 err = insert_state(tree, prealloc, start, end, in convert_extent_bit()
1141 cache_state(prealloc, cached_state); in convert_extent_bit()
1142 prealloc = NULL; in convert_extent_bit()
1186 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1187 if (!prealloc) { in convert_extent_bit()
1191 err = split_state(tree, state, prealloc, start); in convert_extent_bit()
1194 prealloc = NULL; in convert_extent_bit()
1225 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1226 if (!prealloc) { in convert_extent_bit()
1235 err = insert_state(tree, prealloc, start, this_end, in convert_extent_bit()
1239 cache_state(prealloc, cached_state); in convert_extent_bit()
1240 prealloc = NULL; in convert_extent_bit()
1251 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1252 if (!prealloc) { in convert_extent_bit()
1257 err = split_state(tree, state, prealloc, end + 1); in convert_extent_bit()
1261 set_state_bits(tree, prealloc, &bits, NULL); in convert_extent_bit()
1262 cache_state(prealloc, cached_state); in convert_extent_bit()
1263 clear_state_bit(tree, prealloc, &clear_bits, 0, NULL); in convert_extent_bit()
1264 prealloc = NULL; in convert_extent_bit()
1272 if (prealloc) in convert_extent_bit()
1273 free_extent_state(prealloc); in convert_extent_bit()