Lines Matching refs:entry
37 struct entry { struct
59 struct entry *begin; argument
60 struct entry *end;
70 es->begin = vzalloc(sizeof(struct entry) * nr_entries); in space_init()
83 static struct entry *__get_entry(struct entry_space *es, unsigned block) in __get_entry()
85 struct entry *e; in __get_entry()
93 static unsigned to_index(struct entry_space *es, struct entry *e) in to_index()
99 static struct entry *to_entry(struct entry_space *es, unsigned block) in to_entry()
120 static struct entry *l_head(struct entry_space *es, struct ilist *l) in l_head()
125 static struct entry *l_tail(struct entry_space *es, struct ilist *l) in l_tail()
130 static struct entry *l_next(struct entry_space *es, struct entry *e) in l_next()
135 static struct entry *l_prev(struct entry_space *es, struct entry *e) in l_prev()
145 static void l_add_head(struct entry_space *es, struct ilist *l, struct entry *e) in l_add_head()
147 struct entry *head = l_head(es, l); in l_add_head()
161 static void l_add_tail(struct entry_space *es, struct ilist *l, struct entry *e) in l_add_tail()
163 struct entry *tail = l_tail(es, l); in l_add_tail()
178 struct entry *old, struct entry *e) in l_add_before()
180 struct entry *prev = l_prev(es, old); in l_add_before()
195 static void l_del(struct entry_space *es, struct ilist *l, struct entry *e) in l_del()
197 struct entry *prev = l_prev(es, e); in l_del()
198 struct entry *next = l_next(es, e); in l_del()
214 static struct entry *l_pop_tail(struct entry_space *es, struct ilist *l) in l_pop_tail()
216 struct entry *e; in l_pop_tail()
280 static void q_push(struct queue *q, struct entry *e) in q_push()
288 static void q_push_before(struct queue *q, struct entry *old, struct entry *e) in q_push_before()
296 static void q_del(struct queue *q, struct entry *e) in q_del()
306 static struct entry *q_peek(struct queue *q, unsigned max_level, bool can_cross_sentinel) in q_peek()
309 struct entry *e; in q_peek()
328 static struct entry *q_pop(struct queue *q) in q_pop()
330 struct entry *e = q_peek(q, q->nr_levels, true); in q_pop()
341 static struct entry *q_pop_old(struct queue *q, unsigned max_level) in q_pop_old()
343 struct entry *e = q_peek(q, max_level, false); in q_pop_old()
356 static struct entry *__redist_pop_from(struct queue *q, unsigned level) in __redist_pop_from()
358 struct entry *e; in __redist_pop_from()
415 struct entry *e; in q_redistribute()
454 static void q_requeue_before(struct queue *q, struct entry *dest, struct entry *e, unsigned extra_l… in q_requeue_before()
456 struct entry *de; in q_requeue_before()
483 static void q_requeue(struct queue *q, struct entry *e, unsigned extra_levels) in q_requeue()
586 static struct entry *h_head(struct hash_table *ht, unsigned bucket) in h_head()
591 static struct entry *h_next(struct hash_table *ht, struct entry *e) in h_next()
596 static void __h_insert(struct hash_table *ht, unsigned bucket, struct entry *e) in __h_insert()
602 static void h_insert(struct hash_table *ht, struct entry *e) in h_insert()
608 static struct entry *__h_lookup(struct hash_table *ht, unsigned h, dm_oblock_t oblock, in __h_lookup()
609 struct entry **prev) in __h_lookup()
611 struct entry *e; in __h_lookup()
625 struct entry *e, struct entry *prev) in __h_unlink()
636 static struct entry *h_lookup(struct hash_table *ht, dm_oblock_t oblock) in h_lookup()
638 struct entry *e, *prev; in h_lookup()
654 static void h_remove(struct hash_table *ht, struct entry *e) in h_remove()
657 struct entry *prev; in h_remove()
692 static void init_entry(struct entry *e) in init_entry()
705 static struct entry *alloc_entry(struct entry_alloc *ea) in alloc_entry()
707 struct entry *e; in alloc_entry()
722 static struct entry *alloc_particular_entry(struct entry_alloc *ea, unsigned i) in alloc_particular_entry()
724 struct entry *e = __get_entry(ea->es, ea->begin + i); in alloc_particular_entry()
735 static void free_entry(struct entry_alloc *ea, struct entry *e) in free_entry()
750 static unsigned get_index(struct entry_alloc *ea, struct entry *e) in get_index()
755 static struct entry *get_entry(struct entry_alloc *ea, unsigned index) in get_entry()
835 static struct entry *get_sentinel(struct entry_alloc *ea, unsigned level, bool which) in get_sentinel()
840 static struct entry *writeback_sentinel(struct smq_policy *mq, unsigned level) in writeback_sentinel()
845 static struct entry *demote_sentinel(struct smq_policy *mq, unsigned level) in demote_sentinel()
854 struct entry *sentinel; in __update_writeback_sentinels()
867 struct entry *sentinel; in __update_demote_sentinels()
894 struct entry *sentinel; in __sentinels_init()
926 static void push_new(struct smq_policy *mq, struct entry *e) in push_new()
933 static void push(struct smq_policy *mq, struct entry *e) in push()
935 struct entry *sentinel; in push()
955 static void __del(struct smq_policy *mq, struct queue *q, struct entry *e) in __del()
961 static void del(struct smq_policy *mq, struct entry *e) in del()
966 static struct entry *pop_old(struct smq_policy *mq, struct queue *q, unsigned max_level) in pop_old()
968 struct entry *e = q_pop_old(q, max_level); in pop_old()
974 static dm_cblock_t infer_cblock(struct smq_policy *mq, struct entry *e) in infer_cblock()
979 static void requeue(struct smq_policy *mq, struct entry *e) in requeue()
981 struct entry *sentinel; in requeue()
1102 struct entry *demoted = q_peek(&mq->clean, mq->clean.nr_levels, false); in demote_cblock()
1140 static enum promote_result should_promote(struct smq_policy *mq, struct entry *hs_e, struct bio *bi… in should_promote()
1158 struct entry *e; in insert_in_cache()
1190 static struct entry *update_hotspot_queue(struct smq_policy *mq, dm_oblock_t b, struct bio *bio) in update_hotspot_queue()
1194 struct entry *e = h_lookup(&mq->hotspot_table, hb); in update_hotspot_queue()
1236 struct entry *e, *hs_e; in map()
1316 struct entry *e; in smq_lookup()
1332 struct entry *e; in __smq_set_clear_dirty()
1367 struct entry *e; in smq_load_mapping()
1383 struct entry *e; in smq_save_hints()
1417 struct entry *e; in __remove_mapping()
1438 struct entry *e = get_entry(&mq->cache_alloc, from_cblock(cblock)); in __remove_cblock()
1483 struct entry *e = NULL; in __smq_writeback_work()
1523 struct entry *e = h_lookup(&mq->table, current_oblock); in __force_mapping()