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
aef32bf7
Commit
aef32bf7
authored
Sep 11, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: __bch2_btree_insert() -> bch2_btree_insert_trans()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
39791d7d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
18 deletions
+18
-18
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+3
-3
fs/bcachefs/btree_update.c
fs/bcachefs/btree_update.c
+3
-3
fs/bcachefs/btree_update.h
fs/bcachefs/btree_update.h
+1
-1
fs/bcachefs/buckets.c
fs/bcachefs/buckets.c
+1
-1
fs/bcachefs/fsck.c
fs/bcachefs/fsck.c
+1
-1
fs/bcachefs/tests.c
fs/bcachefs/tests.c
+9
-9
No files found.
fs/bcachefs/alloc_background.c
View file @
aef32bf7
...
...
@@ -577,7 +577,7 @@ int bch2_bucket_gens_init(struct bch_fs *c)
ret
=
commit_do
(
&
trans
,
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
,
__bch2_btree_insert
(
&
trans
,
BTREE_ID_bucket_gens
,
&
g
.
k_i
,
0
));
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_bucket_gens
,
&
g
.
k_i
,
0
));
if
(
ret
)
break
;
have_bucket_gens_key
=
false
;
...
...
@@ -597,7 +597,7 @@ int bch2_bucket_gens_init(struct bch_fs *c)
ret
=
commit_do
(
&
trans
,
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
,
__bch2_btree_insert
(
&
trans
,
BTREE_ID_bucket_gens
,
&
g
.
k_i
,
0
));
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_bucket_gens
,
&
g
.
k_i
,
0
));
bch2_trans_exit
(
&
trans
);
...
...
@@ -1911,7 +1911,7 @@ static int bch2_dev_freespace_init(struct bch_fs *c, struct bch_dev *ca,
freespace
->
k
.
p
=
k
.
k
->
p
;
freespace
->
k
.
size
=
k
.
k
->
size
;
ret
=
__bch2_btree_insert
(
&
trans
,
BTREE_ID_freespace
,
freespace
,
0
)
?:
ret
=
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_freespace
,
freespace
,
0
)
?:
bch2_trans_commit
(
&
trans
,
NULL
,
NULL
,
BTREE_INSERT_LAZY_RW
|
BTREE_INSERT_NOFAIL
);
...
...
fs/bcachefs/btree_update.c
View file @
aef32bf7
...
...
@@ -648,7 +648,7 @@ int bch2_btree_insert_nonextent(struct btree_trans *trans,
return
ret
;
}
int
__bch2_btree_insert
(
struct
btree_trans
*
trans
,
enum
btree_id
id
,
int
bch2_btree_insert_trans
(
struct
btree_trans
*
trans
,
enum
btree_id
id
,
struct
bkey_i
*
k
,
enum
btree_update_flags
flags
)
{
struct
btree_iter
iter
;
...
...
@@ -676,7 +676,7 @@ int bch2_btree_insert(struct bch_fs *c, enum btree_id id,
u64
*
journal_seq
,
int
flags
)
{
return
bch2_trans_do
(
c
,
disk_res
,
journal_seq
,
flags
,
__bch2_btree_insert
(
&
trans
,
id
,
k
,
0
));
bch2_btree_insert_trans
(
&
trans
,
id
,
k
,
0
));
}
int
bch2_btree_delete_extent_at
(
struct
btree_trans
*
trans
,
struct
btree_iter
*
iter
,
...
...
fs/bcachefs/btree_update.h
View file @
aef32bf7
...
...
@@ -62,7 +62,7 @@ int bch2_btree_delete_at_buffered(struct btree_trans *, enum btree_id, struct bp
int
bch2_btree_insert_nonextent
(
struct
btree_trans
*
,
enum
btree_id
,
struct
bkey_i
*
,
enum
btree_update_flags
);
int
__bch2_btree_insert
(
struct
btree_trans
*
,
enum
btree_id
,
struct
bkey_i
*
,
int
bch2_btree_insert_trans
(
struct
btree_trans
*
,
enum
btree_id
,
struct
bkey_i
*
,
enum
btree_update_flags
);
int
bch2_btree_insert
(
struct
bch_fs
*
,
enum
btree_id
,
struct
bkey_i
*
,
struct
disk_reservation
*
,
u64
*
,
int
flags
);
...
...
fs/bcachefs/buckets.c
View file @
aef32bf7
...
...
@@ -1201,7 +1201,7 @@ static s64 __bch2_mark_reflink_p(struct btree_trans *trans,
new
->
k
.
p
=
bkey_start_pos
(
p
.
k
);
new
->
k
.
p
.
offset
+=
*
idx
-
start
;
bch2_key_resize
(
&
new
->
k
,
next_idx
-
*
idx
);
ret
=
__bch2_btree_insert
(
trans
,
BTREE_ID_extents
,
&
new
->
k_i
,
ret
=
bch2_btree_insert_trans
(
trans
,
BTREE_ID_extents
,
&
new
->
k_i
,
BTREE_TRIGGER_NORUN
);
}
...
...
fs/bcachefs/fsck.c
View file @
aef32bf7
...
...
@@ -1914,7 +1914,7 @@ static int check_root_trans(struct btree_trans *trans)
ret
=
commit_do
(
trans
,
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
,
__bch2_btree_insert
(
trans
,
BTREE_ID_subvolumes
,
bch2_btree_insert_trans
(
trans
,
BTREE_ID_subvolumes
,
&
root_subvol
.
k_i
,
0
));
if
(
ret
)
{
bch_err_msg
(
c
,
ret
,
"writing root subvol"
);
...
...
fs/bcachefs/tests.c
View file @
aef32bf7
...
...
@@ -622,7 +622,7 @@ static int rand_insert(struct bch_fs *c, u64 nr)
k
.
k
.
p
.
snapshot
=
U32_MAX
;
ret
=
commit_do
(
&
trans
,
NULL
,
NULL
,
0
,
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
.
k_i
,
0
));
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
.
k_i
,
0
));
if
(
ret
)
break
;
}
...
...
@@ -649,14 +649,14 @@ static int rand_insert_multi(struct bch_fs *c, u64 nr)
}
ret
=
commit_do
(
&
trans
,
NULL
,
NULL
,
0
,
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
0
].
k_i
,
0
)
?:
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
1
].
k_i
,
0
)
?:
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
2
].
k_i
,
0
)
?:
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
3
].
k_i
,
0
)
?:
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
4
].
k_i
,
0
)
?:
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
5
].
k_i
,
0
)
?:
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
6
].
k_i
,
0
)
?:
__bch2_btree_insert
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
7
].
k_i
,
0
));
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
0
].
k_i
,
0
)
?:
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
1
].
k_i
,
0
)
?:
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
2
].
k_i
,
0
)
?:
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
3
].
k_i
,
0
)
?:
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
4
].
k_i
,
0
)
?:
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
5
].
k_i
,
0
)
?:
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
6
].
k_i
,
0
)
?:
bch2_btree_insert_trans
(
&
trans
,
BTREE_ID_xattrs
,
&
k
[
7
].
k_i
,
0
));
if
(
ret
)
break
;
}
...
...
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