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
26a170aa
Commit
26a170aa
authored
Jul 11, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: add capacity, reserved to fs_alloc_debug_to_text()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
8a3c8303
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+1
-0
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.c
+2
-0
fs/bcachefs/bcachefs.h
fs/bcachefs/bcachefs.h
+1
-0
No files found.
fs/bcachefs/alloc_background.c
View file @
26a170aa
...
...
@@ -2336,6 +2336,7 @@ void bch2_recalc_capacity(struct bch_fs *c)
reserved_sectors
=
min
(
reserved_sectors
,
capacity
);
c
->
reserved
=
reserved_sectors
;
c
->
capacity
=
capacity
-
reserved_sectors
;
c
->
bucket_size_max
=
bucket_size_max
;
...
...
fs/bcachefs/alloc_foreground.c
View file @
26a170aa
...
...
@@ -1706,6 +1706,8 @@ void bch2_fs_alloc_debug_to_text(struct printbuf *out, struct bch_fs *c)
printbuf_tabstops_reset
(
out
);
printbuf_tabstop_push
(
out
,
24
);
prt_printf
(
out
,
"capacity
\t
%llu
\n
"
,
c
->
capacity
);
prt_printf
(
out
,
"reserved
\t
%llu
\n
"
,
c
->
reserved
);
percpu_down_read
(
&
c
->
mark_lock
);
prt_printf
(
out
,
"hidden
\t
%llu
\n
"
,
bch2_fs_usage_read_one
(
c
,
&
c
->
usage_base
->
b
.
hidden
));
prt_printf
(
out
,
"btree
\t
%llu
\n
"
,
bch2_fs_usage_read_one
(
c
,
&
c
->
usage_base
->
b
.
btree
));
...
...
fs/bcachefs/bcachefs.h
View file @
26a170aa
...
...
@@ -872,6 +872,7 @@ struct bch_fs {
struct
bch_devs_mask
rw_devs
[
BCH_DATA_NR
];
u64
capacity
;
/* sectors */
u64
reserved
;
/* sectors */
/*
* When capacity _decreases_ (due to a disk being removed), we
...
...
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