Lines Matching refs:prealloc

158 static struct extent_state *alloc_extent_state_atomic(struct extent_state *prealloc)  in alloc_extent_state_atomic()  argument
160 if (!prealloc) in alloc_extent_state_atomic()
161 prealloc = alloc_extent_state(GFP_ATOMIC); in alloc_extent_state_atomic()
163 return prealloc; in alloc_extent_state_atomic()
458 struct extent_state *prealloc, u64 split) in split_state() argument
466 prealloc->start = orig->start; in split_state()
467 prealloc->end = split - 1; in split_state()
468 prealloc->state = orig->state; in split_state()
479 if (prealloc->end < entry->start) { in split_state()
481 } else if (prealloc->end > entry->end) { in split_state()
484 free_extent_state(prealloc); in split_state()
489 rb_link_node(&prealloc->rb_node, parent, node); in split_state()
490 rb_insert_color(&prealloc->rb_node, &tree->state); in split_state()
563 struct extent_state *prealloc = NULL; in __clear_extent_bit() local
585 if (!prealloc) { in __clear_extent_bit()
593 prealloc = alloc_extent_state(mask); in __clear_extent_bit()
648 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
649 if (!prealloc) in __clear_extent_bit()
651 err = split_state(tree, state, prealloc, start); in __clear_extent_bit()
655 prealloc = NULL; in __clear_extent_bit()
670 prealloc = alloc_extent_state_atomic(prealloc); in __clear_extent_bit()
671 if (!prealloc) in __clear_extent_bit()
673 err = split_state(tree, state, prealloc, end + 1); in __clear_extent_bit()
680 clear_state_bit(tree, prealloc, bits, wake, changeset); in __clear_extent_bit()
682 prealloc = NULL; in __clear_extent_bit()
704 if (prealloc) in __clear_extent_bit()
705 free_extent_state(prealloc); in __clear_extent_bit()
987 struct extent_state *prealloc = NULL; in __set_extent_bit() local
1005 if (!prealloc) { in __set_extent_bit()
1013 prealloc = alloc_extent_state(mask); in __set_extent_bit()
1029 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1030 if (!prealloc) in __set_extent_bit()
1032 prealloc->start = start; in __set_extent_bit()
1033 prealloc->end = end; in __set_extent_bit()
1034 insert_state_fast(tree, prealloc, p, parent, bits, changeset); in __set_extent_bit()
1035 cache_state(prealloc, cached_state); in __set_extent_bit()
1036 prealloc = NULL; in __set_extent_bit()
1103 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1104 if (!prealloc) in __set_extent_bit()
1106 err = split_state(tree, state, prealloc, start); in __set_extent_bit()
1110 prealloc = NULL; in __set_extent_bit()
1141 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1142 if (!prealloc) in __set_extent_bit()
1149 prealloc->start = start; in __set_extent_bit()
1150 prealloc->end = this_end; in __set_extent_bit()
1151 err = insert_state(tree, prealloc, bits, changeset); in __set_extent_bit()
1155 cache_state(prealloc, cached_state); in __set_extent_bit()
1156 prealloc = NULL; in __set_extent_bit()
1174 prealloc = alloc_extent_state_atomic(prealloc); in __set_extent_bit()
1175 if (!prealloc) in __set_extent_bit()
1177 err = split_state(tree, state, prealloc, end + 1); in __set_extent_bit()
1181 set_state_bits(tree, prealloc, bits, changeset); in __set_extent_bit()
1182 cache_state(prealloc, cached_state); in __set_extent_bit()
1183 merge_state(tree, prealloc); in __set_extent_bit()
1184 prealloc = NULL; in __set_extent_bit()
1198 if (prealloc) in __set_extent_bit()
1199 free_extent_state(prealloc); in __set_extent_bit()
1235 struct extent_state *prealloc = NULL; in convert_extent_bit() local
1248 if (!prealloc) { in convert_extent_bit()
1256 prealloc = alloc_extent_state(GFP_NOFS); in convert_extent_bit()
1257 if (!prealloc && !first_iteration) in convert_extent_bit()
1275 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1276 if (!prealloc) { in convert_extent_bit()
1280 prealloc->start = start; in convert_extent_bit()
1281 prealloc->end = end; in convert_extent_bit()
1282 insert_state_fast(tree, prealloc, p, parent, bits, NULL); in convert_extent_bit()
1283 cache_state(prealloc, cached_state); in convert_extent_bit()
1284 prealloc = NULL; in convert_extent_bit()
1326 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1327 if (!prealloc) { in convert_extent_bit()
1331 err = split_state(tree, state, prealloc, start); in convert_extent_bit()
1334 prealloc = NULL; in convert_extent_bit()
1364 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1365 if (!prealloc) { in convert_extent_bit()
1374 prealloc->start = start; in convert_extent_bit()
1375 prealloc->end = this_end; in convert_extent_bit()
1376 err = insert_state(tree, prealloc, bits, NULL); in convert_extent_bit()
1379 cache_state(prealloc, cached_state); in convert_extent_bit()
1380 prealloc = NULL; in convert_extent_bit()
1391 prealloc = alloc_extent_state_atomic(prealloc); in convert_extent_bit()
1392 if (!prealloc) { in convert_extent_bit()
1397 err = split_state(tree, state, prealloc, end + 1); in convert_extent_bit()
1401 set_state_bits(tree, prealloc, bits, NULL); in convert_extent_bit()
1402 cache_state(prealloc, cached_state); in convert_extent_bit()
1403 clear_state_bit(tree, prealloc, clear_bits, 0, NULL); in convert_extent_bit()
1404 prealloc = NULL; in convert_extent_bit()
1418 if (prealloc) in convert_extent_bit()
1419 free_extent_state(prealloc); in convert_extent_bit()