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
ab5c63f5
Commit
ab5c63f5
authored
May 11, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Don't hardcode BTREE_ID_EXTENTS
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
a7451c42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.c
+2
-2
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_iter.h
+2
-2
No files found.
fs/bcachefs/btree_iter.c
View file @
ab5c63f5
...
...
@@ -1114,7 +1114,7 @@ static inline void bch2_btree_iter_checks(struct btree_iter *iter,
{
EBUG_ON
(
iter
->
btree_id
>=
BTREE_ID_NR
);
EBUG_ON
(
!!
(
iter
->
flags
&
BTREE_ITER_IS_EXTENTS
)
!=
(
iter
->
btree_id
==
BTREE_ID_EXTENTS
&&
(
btree_node_type_is_extents
(
iter
->
btree_id
)
&&
type
!=
BTREE_ITER_NODES
));
bch2_btree_trans_verify_locks
(
iter
->
trans
);
...
...
@@ -1590,7 +1590,7 @@ static inline void bch2_btree_iter_init(struct btree_trans *trans,
struct
bch_fs
*
c
=
trans
->
c
;
unsigned
i
;
if
(
btree_
id
==
BTREE_ID_EXTENTS
&&
if
(
btree_
node_type_is_extents
(
btree_id
)
&&
!
(
flags
&
BTREE_ITER_NODES
))
flags
|=
BTREE_ITER_IS_EXTENTS
;
...
...
fs/bcachefs/btree_iter.h
View file @
ab5c63f5
...
...
@@ -156,7 +156,7 @@ static inline struct bpos btree_type_successor(enum btree_id id,
if
(
id
==
BTREE_ID_INODES
)
{
pos
.
inode
++
;
pos
.
offset
=
0
;
}
else
if
(
id
!=
BTREE_ID_EXTENTS
)
{
}
else
if
(
!
btree_node_type_is_extents
(
id
)
)
{
pos
=
bkey_successor
(
pos
);
}
...
...
@@ -169,7 +169,7 @@ static inline struct bpos btree_type_predecessor(enum btree_id id,
if
(
id
==
BTREE_ID_INODES
)
{
--
pos
.
inode
;
pos
.
offset
=
0
;
}
else
/* if (id != BTREE_ID_EXTENTS) */
{
}
else
{
pos
=
bkey_predecessor
(
pos
);
}
...
...
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