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
93de9e92
Commit
93de9e92
authored
Jul 16, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Inline bch2_snapshot_is_ancestor() fast path
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
813e0cec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
fs/bcachefs/subvolume.c
fs/bcachefs/subvolume.c
+1
-1
fs/bcachefs/subvolume.h
fs/bcachefs/subvolume.h
+8
-1
No files found.
fs/bcachefs/subvolume.c
View file @
93de9e92
...
...
@@ -25,7 +25,7 @@ static inline u32 get_ancestor_below(struct snapshot_table *t, u32 id, u32 ances
return
s
->
parent
;
}
bool
bch2_snapshot_is_ancestor
(
struct
bch_fs
*
c
,
u32
id
,
u32
ancestor
)
bool
__
bch2_snapshot_is_ancestor
(
struct
bch_fs
*
c
,
u32
id
,
u32
ancestor
)
{
struct
snapshot_table
*
t
;
bool
ret
;
...
...
fs/bcachefs/subvolume.h
View file @
93de9e92
...
...
@@ -166,7 +166,14 @@ static inline u32 bch2_snapshot_sibling(struct bch_fs *c, u32 id)
return
0
;
}
bool
bch2_snapshot_is_ancestor
(
struct
bch_fs
*
,
u32
,
u32
);
bool
__bch2_snapshot_is_ancestor
(
struct
bch_fs
*
,
u32
,
u32
);
static
inline
bool
bch2_snapshot_is_ancestor
(
struct
bch_fs
*
c
,
u32
id
,
u32
ancestor
)
{
return
id
==
ancestor
?
true
:
__bch2_snapshot_is_ancestor
(
c
,
id
,
ancestor
);
}
static
inline
bool
bch2_snapshot_has_children
(
struct
bch_fs
*
c
,
u32
id
)
{
...
...
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