f2fs: support 64-bits key in f2fs rb-tree node entry
then, we can add specified entry into rb-tree with 64-bits segment time as key. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -612,8 +612,13 @@ enum {
|
||||
|
||||
struct rb_entry {
|
||||
struct rb_node rb_node; /* rb node located in rb-tree */
|
||||
unsigned int ofs; /* start offset of the entry */
|
||||
unsigned int len; /* length of the entry */
|
||||
union {
|
||||
struct {
|
||||
unsigned int ofs; /* start offset of the entry */
|
||||
unsigned int len; /* length of the entry */
|
||||
};
|
||||
unsigned long long key; /* 64-bits key */
|
||||
};
|
||||
};
|
||||
|
||||
struct extent_info {
|
||||
@@ -3806,6 +3811,10 @@ void f2fs_leave_shrinker(struct f2fs_sb_info *sbi);
|
||||
*/
|
||||
struct rb_entry *f2fs_lookup_rb_tree(struct rb_root_cached *root,
|
||||
struct rb_entry *cached_re, unsigned int ofs);
|
||||
struct rb_node **f2fs_lookup_rb_tree_ext(struct f2fs_sb_info *sbi,
|
||||
struct rb_root_cached *root,
|
||||
struct rb_node **parent,
|
||||
unsigned long long key, bool *left_most);
|
||||
struct rb_node **f2fs_lookup_rb_tree_for_insert(struct f2fs_sb_info *sbi,
|
||||
struct rb_root_cached *root,
|
||||
struct rb_node **parent,
|
||||
@@ -3816,7 +3825,7 @@ struct rb_entry *f2fs_lookup_rb_tree_ret(struct rb_root_cached *root,
|
||||
struct rb_node ***insert_p, struct rb_node **insert_parent,
|
||||
bool force, bool *leftmost);
|
||||
bool f2fs_check_rb_tree_consistence(struct f2fs_sb_info *sbi,
|
||||
struct rb_root_cached *root);
|
||||
struct rb_root_cached *root, bool check_key);
|
||||
unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink);
|
||||
void f2fs_init_extent_tree(struct inode *inode, struct page *ipage);
|
||||
void f2fs_drop_extent_tree(struct inode *inode);
|
||||
|
||||
Reference in New Issue
Block a user