Commit fdecee32 authored by Joe Thornber's avatar Joe Thornber Committed by Mike Snitzer

dm cache policy mq: remove unused generation member of struct entry

Remove to stop wasting memory.
Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 3e45c91e
...@@ -253,7 +253,6 @@ struct entry { ...@@ -253,7 +253,6 @@ struct entry {
*/ */
bool dirty:1; bool dirty:1;
unsigned hit_count; unsigned hit_count;
unsigned generation;
}; };
/* /*
...@@ -744,7 +743,6 @@ static int pre_cache_to_cache(struct mq_policy *mq, struct entry *e, ...@@ -744,7 +743,6 @@ static int pre_cache_to_cache(struct mq_policy *mq, struct entry *e,
new_e->oblock = e->oblock; new_e->oblock = e->oblock;
new_e->dirty = false; new_e->dirty = false;
new_e->hit_count = e->hit_count; new_e->hit_count = e->hit_count;
new_e->generation = e->generation;
del(mq, e); del(mq, e);
free_entry(&mq->pre_cache_pool, e); free_entry(&mq->pre_cache_pool, e);
...@@ -796,7 +794,6 @@ static void insert_in_pre_cache(struct mq_policy *mq, ...@@ -796,7 +794,6 @@ static void insert_in_pre_cache(struct mq_policy *mq,
e->dirty = false; e->dirty = false;
e->oblock = oblock; e->oblock = oblock;
e->hit_count = 1; e->hit_count = 1;
e->generation = mq->generation;
push(mq, e); push(mq, e);
} }
...@@ -829,7 +826,6 @@ static void insert_in_cache(struct mq_policy *mq, dm_oblock_t oblock, ...@@ -829,7 +826,6 @@ static void insert_in_cache(struct mq_policy *mq, dm_oblock_t oblock,
e->oblock = oblock; e->oblock = oblock;
e->dirty = false; e->dirty = false;
e->hit_count = 1; e->hit_count = 1;
e->generation = mq->generation;
push(mq, e); push(mq, e);
result->cblock = infer_cblock(&mq->cache_pool, e); result->cblock = infer_cblock(&mq->cache_pool, e);
...@@ -1026,7 +1022,6 @@ static int mq_load_mapping(struct dm_cache_policy *p, ...@@ -1026,7 +1022,6 @@ static int mq_load_mapping(struct dm_cache_policy *p,
e->oblock = oblock; e->oblock = oblock;
e->dirty = false; /* this gets corrected in a minute */ e->dirty = false; /* this gets corrected in a minute */
e->hit_count = hint_valid ? hint : 1; e->hit_count = hint_valid ? hint : 1;
e->generation = mq->generation;
push(mq, e); push(mq, e);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment