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
440c15cc
Commit
440c15cc
authored
Jun 13, 2022
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Add a persistent counter for bucket invalidation
Signed-off-by:
Kent Overstreet
<
kent.overstreet@gmail.com
>
parent
0e96f5dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+6
-1
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bcachefs_format.h
+5
-4
No files found.
fs/bcachefs/alloc_background.c
View file @
440c15cc
...
...
@@ -1173,11 +1173,16 @@ static void bch2_do_invalidates_work(struct work_struct *work)
s64
nr_to_invalidate
=
should_invalidate_buckets
(
ca
,
bch2_dev_usage_read
(
ca
));
while
(
!
ret
&&
nr_to_invalidate
--
>=
0
)
while
(
nr_to_invalidate
--
>=
0
)
{
ret
=
__bch2_trans_do
(
&
trans
,
NULL
,
NULL
,
BTREE_INSERT_USE_RESERVE
|
BTREE_INSERT_NOFAIL
,
invalidate_one_bucket
(
&
trans
,
ca
));
if
(
ret
)
break
;
this_cpu_inc
(
c
->
counters
[
BCH_COUNTER_bucket_invalidate
]);
}
}
bch2_trans_exit
(
&
trans
);
...
...
fs/bcachefs/bcachefs_format.h
View file @
440c15cc
...
...
@@ -1326,10 +1326,11 @@ struct bch_sb_field_disk_groups {
/* BCH_SB_FIELD_counters */
#define BCH_PERSISTENT_COUNTERS() \
x(io_read, 0) \
x(io_write, 1) \
x(io_move, 2)
#define BCH_PERSISTENT_COUNTERS() \
x(io_read, 0) \
x(io_write, 1) \
x(io_move, 2) \
x(bucket_invalidate, 3)
enum
bch_persistent_counters
{
#define x(t, n, ...) BCH_COUNTER_##t,
...
...
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