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
fa5df9e7
Commit
fa5df9e7
authored
Nov 08, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Include average write size in sysfs journal_debug
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
09e0153b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
fs/bcachefs/journal.c
fs/bcachefs/journal.c
+13
-9
fs/bcachefs/journal_io.c
fs/bcachefs/journal_io.c
+2
-0
fs/bcachefs/journal_types.h
fs/bcachefs/journal_types.h
+1
-0
No files found.
fs/bcachefs/journal.c
View file @
fa5df9e7
...
...
@@ -1262,6 +1262,7 @@ void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
union
journal_res_state
s
;
struct
bch_dev
*
ca
;
unsigned
long
now
=
jiffies
;
u64
nr_writes
=
j
->
nr_flush_writes
+
j
->
nr_noflush_writes
;
u64
seq
;
unsigned
i
;
...
...
@@ -1282,6 +1283,9 @@ void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
prt_printf
(
out
,
"each entry reserved:
\t
%u
\n
"
,
j
->
entry_u64s_reserved
);
prt_printf
(
out
,
"nr flush writes:
\t
%llu
\n
"
,
j
->
nr_flush_writes
);
prt_printf
(
out
,
"nr noflush writes:
\t
%llu
\n
"
,
j
->
nr_noflush_writes
);
prt_printf
(
out
,
"average write size:
\t
"
);
prt_human_readable_u64
(
out
,
nr_writes
?
div64_u64
(
j
->
entry_bytes_written
,
nr_writes
)
:
0
);
prt_newline
(
out
);
prt_printf
(
out
,
"nr direct reclaim:
\t
%llu
\n
"
,
j
->
nr_direct_reclaim
);
prt_printf
(
out
,
"nr background reclaim:
\t
%llu
\n
"
,
j
->
nr_background_reclaim
);
prt_printf
(
out
,
"reclaim kicked:
\t\t
%u
\n
"
,
j
->
reclaim_kicked
);
...
...
fs/bcachefs/journal_io.c
View file @
fa5df9e7
...
...
@@ -1890,6 +1890,8 @@ CLOSURE_CALLBACK(bch2_journal_write)
if
(
ret
)
goto
err
;
j
->
entry_bytes_written
+=
vstruct_bytes
(
w
->
data
);
while
(
1
)
{
spin_lock
(
&
j
->
lock
);
ret
=
journal_write_alloc
(
j
,
w
);
...
...
fs/bcachefs/journal_types.h
View file @
fa5df9e7
...
...
@@ -267,6 +267,7 @@ struct journal {
u64
nr_flush_writes
;
u64
nr_noflush_writes
;
u64
entry_bytes_written
;
struct
bch2_time_stats
*
flush_write_time
;
struct
bch2_time_stats
*
noflush_write_time
;
...
...
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