Fix an extent coalesce bug.

When coalescing, we should take both extents off the LRU list; otherwise decay
can grab the existing outer extent through extents_evict.
This commit is contained in:
Qi Wang
2017-11-14 16:09:31 -08:00
committed by Qi Wang
parent fac706836f
commit eb1b08daae
2 changed files with 18 additions and 7 deletions

View File

@@ -355,6 +355,11 @@ extent_list_append(extent_list_t *list, extent_t *extent) {
ql_tail_insert(list, extent, ql_link);
}
static inline void
extent_list_prepend(extent_list_t *list, extent_t *extent) {
ql_head_insert(list, extent, ql_link);
}
static inline void
extent_list_replace(extent_list_t *list, extent_t *to_remove,
extent_t *to_insert) {