Lines Matching refs:prev

150 	struct rb_node *prev = NULL;  in __tree_search()  local
157 prev = n; in __tree_search()
169 orig_prev = prev; in __tree_search()
170 while (prev && offset >= extent_map_end(prev_entry)) { in __tree_search()
171 prev = rb_next(prev); in __tree_search()
172 prev_entry = rb_entry(prev, struct extent_map, rb_node); in __tree_search()
174 *prev_ret = prev; in __tree_search()
175 prev = orig_prev; in __tree_search()
179 prev_entry = rb_entry(prev, struct extent_map, rb_node); in __tree_search()
180 while (prev && offset < prev_entry->start) { in __tree_search()
181 prev = rb_prev(prev); in __tree_search()
182 prev_entry = rb_entry(prev, struct extent_map, rb_node); in __tree_search()
184 *next_ret = prev; in __tree_search()
190 static int mergable_maps(struct extent_map *prev, struct extent_map *next) in mergable_maps() argument
192 if (test_bit(EXTENT_FLAG_PINNED, &prev->flags)) in mergable_maps()
199 if (test_bit(EXTENT_FLAG_COMPRESSED, &prev->flags)) in mergable_maps()
202 if (test_bit(EXTENT_FLAG_LOGGING, &prev->flags) || in mergable_maps()
211 if (!list_empty(&prev->list) || !list_empty(&next->list)) in mergable_maps()
215 prev->block_start != EXTENT_MAP_DELALLOC); in mergable_maps()
217 if (prev->map_lookup || next->map_lookup) in mergable_maps()
218 ASSERT(test_bit(EXTENT_FLAG_FS_MAPPING, &prev->flags) && in mergable_maps()
221 if (extent_map_end(prev) == next->start && in mergable_maps()
222 prev->flags == next->flags && in mergable_maps()
223 prev->map_lookup == next->map_lookup && in mergable_maps()
225 prev->block_start == EXTENT_MAP_HOLE) || in mergable_maps()
227 prev->block_start == EXTENT_MAP_INLINE) || in mergable_maps()
229 next->block_start == extent_map_block_end(prev)))) { in mergable_maps()
423 struct rb_node *prev = NULL; in __lookup_extent_mapping() local
427 rb_node = __tree_search(&tree->map.rb_root, start, &prev, &next); in __lookup_extent_mapping()
429 if (prev) in __lookup_extent_mapping()
430 rb_node = prev; in __lookup_extent_mapping()
526 struct rb_node *prev; in prev_extent_map() local
528 prev = rb_prev(&em->rb_node); in prev_extent_map()
529 if (!prev) in prev_extent_map()
531 return container_of(prev, struct extent_map, rb_node); in prev_extent_map()
545 struct extent_map *prev; in merge_extent_mapping() local
555 prev = prev_extent_map(next); in merge_extent_mapping()
557 prev = existing; in merge_extent_mapping()
558 next = next_extent_map(prev); in merge_extent_mapping()
561 start = prev ? extent_map_end(prev) : em->start; in merge_extent_mapping()