Lines Matching refs:prealloc

592 		       struct extent_state *prealloc, u64 split)  in split_state()  argument
599 prealloc->start = orig->start; in split_state()
600 prealloc->end = split - 1; in split_state()
601 prealloc->state = orig->state; in split_state()
604 node = tree_insert(&tree->state, &orig->rb_node, prealloc->end, in split_state()
605 &prealloc->rb_node, NULL, NULL); in split_state()
607 free_extent_state(prealloc); in split_state()
669 alloc_extent_state_atomic(struct extent_state *prealloc) in alloc_extent_state_atomic() argument
671 if (!prealloc) in alloc_extent_state_atomic()
672 prealloc = alloc_extent_state(GFP_ATOMIC); in alloc_extent_state_atomic()
674 return prealloc; in alloc_extent_state_atomic()
704 struct extent_state *prealloc = NULL; in __clear_extent_bit() local
722 if (!prealloc && gfpflags_allow_blocking(mask)) { in __clear_extent_bit()
730 prealloc = alloc_extent_state(mask); in __clear_extent_bit()
789 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
790 BUG_ON(!prealloc); in __clear_extent_bit()
791 err = split_state(tree, state, prealloc, start); in __clear_extent_bit()
795 prealloc = NULL; in __clear_extent_bit()
812 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
813 BUG_ON(!prealloc); in __clear_extent_bit()
814 err = split_state(tree, state, prealloc, end + 1); in __clear_extent_bit()
821 clear_state_bit(tree, prealloc, &bits, wake, changeset); in __clear_extent_bit()
823 prealloc = NULL; in __clear_extent_bit()
845 if (prealloc) in __clear_extent_bit()
846 free_extent_state(prealloc); in __clear_extent_bit()
972 struct extent_state *prealloc = NULL; in __set_extent_bit() local
984 if (!prealloc && gfpflags_allow_blocking(mask)) { in __set_extent_bit()
992 prealloc = alloc_extent_state(mask); in __set_extent_bit()
1010 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1011 BUG_ON(!prealloc); in __set_extent_bit()
1012 err = insert_state(tree, prealloc, start, end, in __set_extent_bit()
1017 cache_state(prealloc, cached_state); in __set_extent_bit()
1018 prealloc = NULL; in __set_extent_bit()
1085 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1086 BUG_ON(!prealloc); in __set_extent_bit()
1087 err = split_state(tree, state, prealloc, start); in __set_extent_bit()
1091 prealloc = NULL; in __set_extent_bit()
1122 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1123 BUG_ON(!prealloc); in __set_extent_bit()
1129 err = insert_state(tree, prealloc, start, this_end, in __set_extent_bit()
1134 cache_state(prealloc, cached_state); in __set_extent_bit()
1135 prealloc = NULL; in __set_extent_bit()
1152 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1153 BUG_ON(!prealloc); in __set_extent_bit()
1154 err = split_state(tree, state, prealloc, end + 1); in __set_extent_bit()
1158 set_state_bits(tree, prealloc, &bits, changeset); in __set_extent_bit()
1159 cache_state(prealloc, cached_state); in __set_extent_bit()
1160 merge_state(tree, prealloc); in __set_extent_bit()
1161 prealloc = NULL; in __set_extent_bit()
1175 if (prealloc) in __set_extent_bit()
1176 free_extent_state(prealloc); in __set_extent_bit()
1214 struct extent_state *prealloc = NULL; in convert_extent_bit() local
1228 if (!prealloc) { in convert_extent_bit()
1236 prealloc = alloc_extent_state(GFP_NOFS); in convert_extent_bit()
1237 if (!prealloc && !first_iteration) in convert_extent_bit()
1257 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1258 if (!prealloc) { in convert_extent_bit()
1262 err = insert_state(tree, prealloc, start, end, in convert_extent_bit()
1266 cache_state(prealloc, cached_state); in convert_extent_bit()
1267 prealloc = NULL; in convert_extent_bit()
1311 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1312 if (!prealloc) { in convert_extent_bit()
1316 err = split_state(tree, state, prealloc, start); in convert_extent_bit()
1319 prealloc = NULL; in convert_extent_bit()
1350 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1351 if (!prealloc) { in convert_extent_bit()
1360 err = insert_state(tree, prealloc, start, this_end, in convert_extent_bit()
1364 cache_state(prealloc, cached_state); in convert_extent_bit()
1365 prealloc = NULL; in convert_extent_bit()
1376 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1377 if (!prealloc) { in convert_extent_bit()
1382 err = split_state(tree, state, prealloc, end + 1); in convert_extent_bit()
1386 set_state_bits(tree, prealloc, &bits, NULL); in convert_extent_bit()
1387 cache_state(prealloc, cached_state); in convert_extent_bit()
1388 clear_state_bit(tree, prealloc, &clear_bits, 0, NULL); in convert_extent_bit()
1389 prealloc = NULL; in convert_extent_bit()
1403 if (prealloc) in convert_extent_bit()
1404 free_extent_state(prealloc); in convert_extent_bit()