Lines Matching refs:prealloc

563 		       struct extent_state *prealloc, u64 split)  in split_state()  argument
570 prealloc->start = orig->start; in split_state()
571 prealloc->end = split - 1; in split_state()
572 prealloc->state = orig->state; in split_state()
575 node = tree_insert(&tree->state, &orig->rb_node, prealloc->end, in split_state()
576 &prealloc->rb_node, NULL, NULL); in split_state()
578 free_extent_state(prealloc); in split_state()
640 alloc_extent_state_atomic(struct extent_state *prealloc) in alloc_extent_state_atomic() argument
642 if (!prealloc) in alloc_extent_state_atomic()
643 prealloc = alloc_extent_state(GFP_ATOMIC); in alloc_extent_state_atomic()
645 return prealloc; in alloc_extent_state_atomic()
675 struct extent_state *prealloc = NULL; in __clear_extent_bit() local
693 if (!prealloc && gfpflags_allow_blocking(mask)) { in __clear_extent_bit()
701 prealloc = alloc_extent_state(mask); in __clear_extent_bit()
760 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
761 BUG_ON(!prealloc); in __clear_extent_bit()
762 err = split_state(tree, state, prealloc, start); in __clear_extent_bit()
766 prealloc = NULL; in __clear_extent_bit()
783 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
784 BUG_ON(!prealloc); in __clear_extent_bit()
785 err = split_state(tree, state, prealloc, end + 1); in __clear_extent_bit()
792 clear_state_bit(tree, prealloc, &bits, wake, changeset); in __clear_extent_bit()
794 prealloc = NULL; in __clear_extent_bit()
816 if (prealloc) in __clear_extent_bit()
817 free_extent_state(prealloc); in __clear_extent_bit()
943 struct extent_state *prealloc = NULL; in __set_extent_bit() local
955 if (!prealloc && gfpflags_allow_blocking(mask)) { in __set_extent_bit()
963 prealloc = alloc_extent_state(mask); in __set_extent_bit()
981 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
982 BUG_ON(!prealloc); in __set_extent_bit()
983 err = insert_state(tree, prealloc, start, end, in __set_extent_bit()
988 cache_state(prealloc, cached_state); in __set_extent_bit()
989 prealloc = NULL; in __set_extent_bit()
1046 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1047 BUG_ON(!prealloc); in __set_extent_bit()
1048 err = split_state(tree, state, prealloc, start); in __set_extent_bit()
1052 prealloc = NULL; in __set_extent_bit()
1083 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1084 BUG_ON(!prealloc); in __set_extent_bit()
1090 err = insert_state(tree, prealloc, start, this_end, in __set_extent_bit()
1095 cache_state(prealloc, cached_state); in __set_extent_bit()
1096 prealloc = NULL; in __set_extent_bit()
1113 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1114 BUG_ON(!prealloc); in __set_extent_bit()
1115 err = split_state(tree, state, prealloc, end + 1); in __set_extent_bit()
1119 set_state_bits(tree, prealloc, &bits, changeset); in __set_extent_bit()
1120 cache_state(prealloc, cached_state); in __set_extent_bit()
1121 merge_state(tree, prealloc); in __set_extent_bit()
1122 prealloc = NULL; in __set_extent_bit()
1136 if (prealloc) in __set_extent_bit()
1137 free_extent_state(prealloc); in __set_extent_bit()
1175 struct extent_state *prealloc = NULL; in convert_extent_bit() local
1189 if (!prealloc) { in convert_extent_bit()
1197 prealloc = alloc_extent_state(GFP_NOFS); in convert_extent_bit()
1198 if (!prealloc && !first_iteration) in convert_extent_bit()
1218 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1219 if (!prealloc) { in convert_extent_bit()
1223 err = insert_state(tree, prealloc, start, end, in convert_extent_bit()
1227 cache_state(prealloc, cached_state); in convert_extent_bit()
1228 prealloc = NULL; in convert_extent_bit()
1272 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1273 if (!prealloc) { in convert_extent_bit()
1277 err = split_state(tree, state, prealloc, start); in convert_extent_bit()
1280 prealloc = NULL; in convert_extent_bit()
1311 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1312 if (!prealloc) { in convert_extent_bit()
1321 err = insert_state(tree, prealloc, start, this_end, in convert_extent_bit()
1325 cache_state(prealloc, cached_state); in convert_extent_bit()
1326 prealloc = NULL; in convert_extent_bit()
1337 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1338 if (!prealloc) { in convert_extent_bit()
1343 err = split_state(tree, state, prealloc, end + 1); in convert_extent_bit()
1347 set_state_bits(tree, prealloc, &bits, NULL); in convert_extent_bit()
1348 cache_state(prealloc, cached_state); in convert_extent_bit()
1349 clear_state_bit(tree, prealloc, &clear_bits, 0, NULL); in convert_extent_bit()
1350 prealloc = NULL; in convert_extent_bit()
1364 if (prealloc) in convert_extent_bit()
1365 free_extent_state(prealloc); in convert_extent_bit()