Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
153d1c63
Commit
153d1c63
authored
Dec 28, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: unify alloc trigger
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
6820ac2c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
165 deletions
+137
-165
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+127
-153
fs/bcachefs/alloc_background.h
fs/bcachefs/alloc_background.h
+10
-12
No files found.
fs/bcachefs/alloc_background.c
View file @
153d1c63
This diff is collapsed.
Click to expand it.
fs/bcachefs/alloc_background.h
View file @
153d1c63
...
...
@@ -182,24 +182,24 @@ void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
#define bch2_bkey_ops_alloc ((struct bkey_ops) { \
.key_invalid = bch2_alloc_v1_invalid, \
.val_to_text = bch2_alloc_to_text, \
.trans_trigger = bch2_tr
ans_mark_alloc,
\
.atomic_trigger = bch2_
mark
_alloc, \
.trans_trigger = bch2_tr
igger_alloc,
\
.atomic_trigger = bch2_
trigger
_alloc, \
.min_val_size = 8, \
})
#define bch2_bkey_ops_alloc_v2 ((struct bkey_ops) { \
.key_invalid = bch2_alloc_v2_invalid, \
.val_to_text = bch2_alloc_to_text, \
.trans_trigger = bch2_tr
ans_mark_alloc,
\
.atomic_trigger = bch2_
mark
_alloc, \
.trans_trigger = bch2_tr
igger_alloc,
\
.atomic_trigger = bch2_
trigger
_alloc, \
.min_val_size = 8, \
})
#define bch2_bkey_ops_alloc_v3 ((struct bkey_ops) { \
.key_invalid = bch2_alloc_v3_invalid, \
.val_to_text = bch2_alloc_to_text, \
.trans_trigger = bch2_tr
ans_mark_alloc,
\
.atomic_trigger = bch2_
mark
_alloc, \
.trans_trigger = bch2_tr
igger_alloc,
\
.atomic_trigger = bch2_
trigger
_alloc, \
.min_val_size = 16, \
})
...
...
@@ -207,8 +207,8 @@ void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
.key_invalid = bch2_alloc_v4_invalid, \
.val_to_text = bch2_alloc_to_text, \
.swab = bch2_alloc_v4_swab, \
.trans_trigger = bch2_tr
ans_mark_alloc,
\
.atomic_trigger = bch2_
mark
_alloc, \
.trans_trigger = bch2_tr
igger_alloc,
\
.atomic_trigger = bch2_
trigger
_alloc, \
.min_val_size = 48, \
})
...
...
@@ -232,10 +232,8 @@ static inline bool bkey_is_alloc(const struct bkey *k)
int
bch2_alloc_read
(
struct
bch_fs
*
);
int
bch2_trans_mark_alloc
(
struct
btree_trans
*
,
enum
btree_id
,
unsigned
,
struct
bkey_s_c
,
struct
bkey_s
,
unsigned
);
int
bch2_mark_alloc
(
struct
btree_trans
*
,
enum
btree_id
,
unsigned
,
struct
bkey_s_c
,
struct
bkey_s
,
unsigned
);
int
bch2_trigger_alloc
(
struct
btree_trans
*
,
enum
btree_id
,
unsigned
,
struct
bkey_s_c
,
struct
bkey_s
,
unsigned
);
int
bch2_check_alloc_info
(
struct
bch_fs
*
);
int
bch2_check_alloc_to_lru_refs
(
struct
bch_fs
*
);
void
bch2_do_discards
(
struct
bch_fs
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment