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
311e446a
Commit
311e446a
authored
Dec 10, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_btree_path_to_text() -> btree_path_idx_t
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
1f75ba4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.c
+6
-6
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_iter.h
+6
-1
No files found.
fs/bcachefs/btree_iter.c
View file @
311e446a
...
...
@@ -1413,11 +1413,12 @@ void bch2_dump_trans_updates(struct btree_trans *trans)
printbuf_exit
(
&
buf
);
}
noinline
__cold
void
bch2_btree_path_to_text
(
struct
printbuf
*
out
,
struct
btree_path
*
path
)
static
void
bch2_btree_path_to_text
(
struct
printbuf
*
out
,
struct
btree_trans
*
trans
,
btree_path_idx_t
path_idx
)
{
struct
btree_path
*
path
=
trans
->
paths
+
path_idx
;
prt_printf
(
out
,
"path: idx %2u ref %u:%u %c %c btree=%s l=%u pos "
,
path
->
idx
,
path
->
ref
,
path
->
intent_ref
,
path
_
idx
,
path
->
ref
,
path
->
intent_ref
,
path
->
preserve
?
'P'
:
' '
,
path
->
should_be_locked
?
'S'
:
' '
,
bch2_btree_id_str
(
path
->
btree_id
),
...
...
@@ -1436,13 +1437,12 @@ void __bch2_trans_paths_to_text(struct printbuf *out, struct btree_trans *trans,
bool
nosort
)
{
struct
trans_for_each_path_inorder_iter
iter
;
struct
btree_path
*
path
;
if
(
!
nosort
)
btree_trans_sort_paths
(
trans
);
trans_for_each_path_i
norder
(
trans
,
path
,
iter
)
bch2_btree_path_to_text
(
out
,
path
);
trans_for_each_path_i
dx_inorder
(
trans
,
iter
)
bch2_btree_path_to_text
(
out
,
trans
,
iter
.
path_idx
);
}
noinline
__cold
...
...
fs/bcachefs/btree_iter.h
View file @
311e446a
...
...
@@ -125,6 +125,12 @@ static inline struct btree_path *prev_btree_path(struct btree_trans *trans, stru
:
NULL
;
}
#define trans_for_each_path_idx_inorder(_trans, _iter) \
for (_iter = (struct trans_for_each_path_inorder_iter) { 0 }; \
(_iter.path_idx = trans->sorted[_iter.sorted_idx], \
_iter.sorted_idx < (_trans)->nr_sorted); \
_iter.sorted_idx++)
struct
trans_for_each_path_inorder_iter
{
btree_path_idx_t
sorted_idx
;
btree_path_idx_t
path_idx
;
...
...
@@ -835,7 +841,6 @@ __bch2_btree_iter_peek_and_restart(struct btree_trans *trans,
})
void
bch2_trans_updates_to_text
(
struct
printbuf
*
,
struct
btree_trans
*
);
void
bch2_btree_path_to_text
(
struct
printbuf
*
,
struct
btree_path
*
);
void
bch2_trans_paths_to_text
(
struct
printbuf
*
,
struct
btree_trans
*
);
void
bch2_dump_trans_updates
(
struct
btree_trans
*
);
void
bch2_dump_trans_paths_updates
(
struct
btree_trans
*
);
...
...
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