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
506b1876
Commit
506b1876
authored
Feb 08, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_btree_bit_mod -> bch2_btree_bit_mod_buffered
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
56e23047
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
9 deletions
+11
-9
fs/bcachefs/btree_update.c
fs/bcachefs/btree_update.c
+2
-2
fs/bcachefs/btree_update.h
fs/bcachefs/btree_update.h
+2
-2
fs/bcachefs/buckets.c
fs/bcachefs/buckets.c
+2
-1
fs/bcachefs/inode.c
fs/bcachefs/inode.c
+3
-2
fs/bcachefs/lru.c
fs/bcachefs/lru.c
+2
-2
No files found.
fs/bcachefs/btree_update.c
View file @
506b1876
...
...
@@ -785,8 +785,8 @@ int bch2_btree_delete_range(struct bch_fs *c, enum btree_id id,
return
ret
;
}
int
bch2_btree_bit_mod
(
struct
btree_trans
*
trans
,
enum
btree_id
btree
,
struct
bpos
pos
,
bool
set
)
int
bch2_btree_bit_mod
_buffered
(
struct
btree_trans
*
trans
,
enum
btree_id
btree
,
struct
bpos
pos
,
bool
set
)
{
struct
bkey_i
k
;
...
...
fs/bcachefs/btree_update.h
View file @
506b1876
...
...
@@ -62,12 +62,12 @@ int bch2_btree_delete_range_trans(struct btree_trans *, enum btree_id,
int
bch2_btree_delete_range
(
struct
bch_fs
*
,
enum
btree_id
,
struct
bpos
,
struct
bpos
,
unsigned
,
u64
*
);
int
bch2_btree_bit_mod
(
struct
btree_trans
*
,
enum
btree_id
,
struct
bpos
,
bool
);
int
bch2_btree_bit_mod
_buffered
(
struct
btree_trans
*
,
enum
btree_id
,
struct
bpos
,
bool
);
static
inline
int
bch2_btree_delete_at_buffered
(
struct
btree_trans
*
trans
,
enum
btree_id
btree
,
struct
bpos
pos
)
{
return
bch2_btree_bit_mod
(
trans
,
btree
,
pos
,
false
);
return
bch2_btree_bit_mod
_buffered
(
trans
,
btree
,
pos
,
false
);
}
int
__bch2_insert_snapshot_whiteouts
(
struct
btree_trans
*
,
enum
btree_id
,
...
...
fs/bcachefs/buckets.c
View file @
506b1876
...
...
@@ -1053,7 +1053,8 @@ int bch2_trigger_extent(struct btree_trans *trans,
(
int
)
bch2_bkey_needs_rebalance
(
c
,
old
);
if
(
mod
)
{
int
ret
=
bch2_btree_bit_mod
(
trans
,
BTREE_ID_rebalance_work
,
new
.
k
->
p
,
mod
>
0
);
int
ret
=
bch2_btree_bit_mod_buffered
(
trans
,
BTREE_ID_rebalance_work
,
new
.
k
->
p
,
mod
>
0
);
if
(
ret
)
return
ret
;
}
...
...
fs/bcachefs/inode.c
View file @
506b1876
...
...
@@ -620,7 +620,8 @@ int bch2_trigger_inode(struct btree_trans *trans,
bool
old_deleted
=
bkey_is_deleted_inode
(
old
);
bool
new_deleted
=
bkey_is_deleted_inode
(
new
.
s_c
);
if
(
old_deleted
!=
new_deleted
)
{
int
ret
=
bch2_btree_bit_mod
(
trans
,
BTREE_ID_deleted_inodes
,
new
.
k
->
p
,
new_deleted
);
int
ret
=
bch2_btree_bit_mod_buffered
(
trans
,
BTREE_ID_deleted_inodes
,
new
.
k
->
p
,
new_deleted
);
if
(
ret
)
return
ret
;
}
...
...
@@ -1170,7 +1171,7 @@ static int may_delete_deleted_inode(struct btree_trans *trans,
bch2_trans_iter_exit
(
trans
,
&
inode_iter
);
return
ret
;
delete:
ret
=
bch2_btree_bit_mod
(
trans
,
BTREE_ID_deleted_inodes
,
pos
,
false
);
ret
=
bch2_btree_bit_mod
_buffered
(
trans
,
BTREE_ID_deleted_inodes
,
pos
,
false
);
goto
out
;
}
...
...
fs/bcachefs/lru.c
View file @
506b1876
...
...
@@ -44,8 +44,8 @@ static int __bch2_lru_set(struct btree_trans *trans, u16 lru_id,
u64
dev_bucket
,
u64
time
,
bool
set
)
{
return
time
?
bch2_btree_bit_mod
(
trans
,
BTREE_ID_lru
,
lru_pos
(
lru_id
,
dev_bucket
,
time
),
set
)
?
bch2_btree_bit_mod
_buffered
(
trans
,
BTREE_ID_lru
,
lru_pos
(
lru_id
,
dev_bucket
,
time
),
set
)
:
0
;
}
...
...
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