mbcache: get rid of _e_hash_list_head

Get rid of field _e_hash_list_head in cache entries and add bit field
e_referenced instead.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Andreas Gruenbacher 2016-02-22 22:42:05 -05:00 committed by Theodore Ts'o
parent 2335d05f3a
commit dc8d5e565f
2 changed files with 12 additions and 37 deletions

View file

@ -12,18 +12,14 @@ struct mb_cache;
struct mb_cache_entry {
/* List of entries in cache - protected by cache->c_list_lock */
struct list_head e_list;
/* Hash table list - protected by bitlock in e_hash_list_head */
/* Hash table list - protected by hash chain bitlock */
struct hlist_bl_node e_hash_list;
atomic_t e_refcnt;
/* Key in hash - stable during lifetime of the entry */
u32 e_key;
u32 e_referenced:1;
/* Block number of hashed block - stable during lifetime of the entry */
sector_t e_block;
/*
* Head of hash list (for list bit lock) - stable. Combined with
* referenced bit of entry
*/
unsigned long _e_hash_list_head;
};
struct mb_cache *mb_cache_create(int bucket_bits);