Loading fs/bcachefs/btree_key_cache_types.h 0 → 100644 +30 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _BCACHEFS_BTREE_KEY_CACHE_TYPES_H #define _BCACHEFS_BTREE_KEY_CACHE_TYPES_H struct btree_key_cache_freelist { struct bkey_cached *objs[16]; unsigned nr; }; struct btree_key_cache { struct mutex lock; struct rhashtable table; bool table_init_done; struct list_head freed_pcpu; struct list_head freed_nonpcpu; struct shrinker *shrink; unsigned shrink_iter; struct btree_key_cache_freelist __percpu *pcpu_freed; atomic_long_t nr_freed; atomic_long_t nr_keys; atomic_long_t nr_dirty; }; struct bkey_cached_key { u32 btree_id; struct bpos pos; } __packed __aligned(4); #endif /* _BCACHEFS_BTREE_KEY_CACHE_TYPES_H */ fs/bcachefs/btree_types.h +1 −26 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ #include <linux/list.h> #include <linux/rhashtable.h> //#include "bkey_methods.h" #include "btree_key_cache_types.h" #include "buckets_types.h" #include "darray.h" #include "errcode.h" Loading Loading @@ -312,31 +312,6 @@ struct btree_iter { #endif }; struct btree_key_cache_freelist { struct bkey_cached *objs[16]; unsigned nr; }; struct btree_key_cache { struct mutex lock; struct rhashtable table; bool table_init_done; struct list_head freed_pcpu; struct list_head freed_nonpcpu; struct shrinker *shrink; unsigned shrink_iter; struct btree_key_cache_freelist __percpu *pcpu_freed; atomic_long_t nr_freed; atomic_long_t nr_keys; atomic_long_t nr_dirty; }; struct bkey_cached_key { u32 btree_id; struct bpos pos; } __packed __aligned(4); #define BKEY_CACHED_ACCESSED 0 #define BKEY_CACHED_DIRTY 1 Loading Loading
fs/bcachefs/btree_key_cache_types.h 0 → 100644 +30 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _BCACHEFS_BTREE_KEY_CACHE_TYPES_H #define _BCACHEFS_BTREE_KEY_CACHE_TYPES_H struct btree_key_cache_freelist { struct bkey_cached *objs[16]; unsigned nr; }; struct btree_key_cache { struct mutex lock; struct rhashtable table; bool table_init_done; struct list_head freed_pcpu; struct list_head freed_nonpcpu; struct shrinker *shrink; unsigned shrink_iter; struct btree_key_cache_freelist __percpu *pcpu_freed; atomic_long_t nr_freed; atomic_long_t nr_keys; atomic_long_t nr_dirty; }; struct bkey_cached_key { u32 btree_id; struct bpos pos; } __packed __aligned(4); #endif /* _BCACHEFS_BTREE_KEY_CACHE_TYPES_H */
fs/bcachefs/btree_types.h +1 −26 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ #include <linux/list.h> #include <linux/rhashtable.h> //#include "bkey_methods.h" #include "btree_key_cache_types.h" #include "buckets_types.h" #include "darray.h" #include "errcode.h" Loading Loading @@ -312,31 +312,6 @@ struct btree_iter { #endif }; struct btree_key_cache_freelist { struct bkey_cached *objs[16]; unsigned nr; }; struct btree_key_cache { struct mutex lock; struct rhashtable table; bool table_init_done; struct list_head freed_pcpu; struct list_head freed_nonpcpu; struct shrinker *shrink; unsigned shrink_iter; struct btree_key_cache_freelist __percpu *pcpu_freed; atomic_long_t nr_freed; atomic_long_t nr_keys; atomic_long_t nr_dirty; }; struct bkey_cached_key { u32 btree_id; struct bpos pos; } __packed __aligned(4); #define BKEY_CACHED_ACCESSED 0 #define BKEY_CACHED_DIRTY 1 Loading