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
5b883656
Commit
5b883656
authored
Jan 05, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: __bch2_sb_field_to_text()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
1f5af5fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
fs/bcachefs/super-io.c
fs/bcachefs/super-io.c
+12
-7
fs/bcachefs/super-io.h
fs/bcachefs/super-io.h
+2
-0
No files found.
fs/bcachefs/super-io.c
View file @
5b883656
...
@@ -1187,8 +1187,8 @@ static int bch2_sb_field_validate(struct bch_sb *sb, struct bch_sb_field *f,
...
@@ -1187,8 +1187,8 @@ static int bch2_sb_field_validate(struct bch_sb *sb, struct bch_sb_field *f,
return
ret
;
return
ret
;
}
}
void
bch2_sb_field_to_text
(
struct
printbuf
*
out
,
struct
bch_sb
*
sb
,
void
__
bch2_sb_field_to_text
(
struct
printbuf
*
out
,
struct
bch_sb
*
sb
,
struct
bch_sb_field
*
f
)
struct
bch_sb_field
*
f
)
{
{
unsigned
type
=
le32_to_cpu
(
f
->
type
);
unsigned
type
=
le32_to_cpu
(
f
->
type
);
const
struct
bch_sb_field_ops
*
ops
=
bch2_sb_field_type_ops
(
type
);
const
struct
bch_sb_field_ops
*
ops
=
bch2_sb_field_type_ops
(
type
);
...
@@ -1196,6 +1196,15 @@ void bch2_sb_field_to_text(struct printbuf *out, struct bch_sb *sb,
...
@@ -1196,6 +1196,15 @@ void bch2_sb_field_to_text(struct printbuf *out, struct bch_sb *sb,
if
(
!
out
->
nr_tabstops
)
if
(
!
out
->
nr_tabstops
)
printbuf_tabstop_push
(
out
,
32
);
printbuf_tabstop_push
(
out
,
32
);
if
(
ops
->
to_text
)
ops
->
to_text
(
out
,
sb
,
f
);
}
void
bch2_sb_field_to_text
(
struct
printbuf
*
out
,
struct
bch_sb
*
sb
,
struct
bch_sb_field
*
f
)
{
unsigned
type
=
le32_to_cpu
(
f
->
type
);
if
(
type
<
BCH_SB_FIELD_NR
)
if
(
type
<
BCH_SB_FIELD_NR
)
prt_printf
(
out
,
"%s"
,
bch2_sb_fields
[
type
]);
prt_printf
(
out
,
"%s"
,
bch2_sb_fields
[
type
]);
else
else
...
@@ -1204,11 +1213,7 @@ void bch2_sb_field_to_text(struct printbuf *out, struct bch_sb *sb,
...
@@ -1204,11 +1213,7 @@ void bch2_sb_field_to_text(struct printbuf *out, struct bch_sb *sb,
prt_printf
(
out
,
" (size %zu):"
,
vstruct_bytes
(
f
));
prt_printf
(
out
,
" (size %zu):"
,
vstruct_bytes
(
f
));
prt_newline
(
out
);
prt_newline
(
out
);
if
(
ops
->
to_text
)
{
__bch2_sb_field_to_text
(
out
,
sb
,
f
);
printbuf_indent_add
(
out
,
2
);
ops
->
to_text
(
out
,
sb
,
f
);
printbuf_indent_sub
(
out
,
2
);
}
}
}
void
bch2_sb_layout_to_text
(
struct
printbuf
*
out
,
struct
bch_sb_layout
*
l
)
void
bch2_sb_layout_to_text
(
struct
printbuf
*
out
,
struct
bch_sb_layout
*
l
)
...
...
fs/bcachefs/super-io.h
View file @
5b883656
...
@@ -93,6 +93,8 @@ static inline void bch2_check_set_feature(struct bch_fs *c, unsigned feat)
...
@@ -93,6 +93,8 @@ static inline void bch2_check_set_feature(struct bch_fs *c, unsigned feat)
bool
bch2_check_version_downgrade
(
struct
bch_fs
*
);
bool
bch2_check_version_downgrade
(
struct
bch_fs
*
);
void
bch2_sb_upgrade
(
struct
bch_fs
*
,
unsigned
);
void
bch2_sb_upgrade
(
struct
bch_fs
*
,
unsigned
);
void
__bch2_sb_field_to_text
(
struct
printbuf
*
,
struct
bch_sb
*
,
struct
bch_sb_field
*
);
void
bch2_sb_field_to_text
(
struct
printbuf
*
,
struct
bch_sb
*
,
void
bch2_sb_field_to_text
(
struct
printbuf
*
,
struct
bch_sb
*
,
struct
bch_sb_field
*
);
struct
bch_sb_field
*
);
void
bch2_sb_layout_to_text
(
struct
printbuf
*
,
struct
bch_sb_layout
*
);
void
bch2_sb_layout_to_text
(
struct
printbuf
*
,
struct
bch_sb_layout
*
);
...
...
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