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
1ae8a090
Commit
1ae8a090
authored
Nov 16, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Kill memset() in bch2_btree_iter_init()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
ae0e6117
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bcachefs_format.h
+7
-0
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_iter.h
+11
-8
fs/bcachefs/btree_types.h
fs/bcachefs/btree_types.h
+1
-2
No files found.
fs/bcachefs/bcachefs_format.h
View file @
1ae8a090
...
@@ -307,6 +307,13 @@ struct bkey_i {
...
@@ -307,6 +307,13 @@ struct bkey_i {
struct
bch_val
v
;
struct
bch_val
v
;
};
};
#define POS_KEY(_pos) \
((struct bkey) { \
.u64s = BKEY_U64s, \
.format = KEY_FORMAT_CURRENT, \
.p = _pos, \
})
#define KEY(_inode, _offset, _size) \
#define KEY(_inode, _offset, _size) \
((struct bkey) { \
((struct bkey) { \
.u64s = BKEY_U64s, \
.u64s = BKEY_U64s, \
...
...
fs/bcachefs/btree_iter.h
View file @
1ae8a090
...
@@ -445,14 +445,17 @@ static inline void bch2_trans_iter_init_common(struct btree_trans *trans,
...
@@ -445,14 +445,17 @@ static inline void bch2_trans_iter_init_common(struct btree_trans *trans,
unsigned
flags
,
unsigned
flags
,
unsigned
long
ip
)
unsigned
long
ip
)
{
{
memset
(
iter
,
0
,
sizeof
(
*
iter
));
iter
->
trans
=
trans
;
iter
->
trans
=
trans
;
iter
->
update_path
=
NULL
;
iter
->
btree_id
=
btree_id
;
iter
->
key_cache_path
=
NULL
;
iter
->
flags
=
flags
;
iter
->
btree_id
=
btree_id
;
iter
->
snapshot
=
pos
.
snapshot
;
iter
->
min_depth
=
0
;
iter
->
pos
=
pos
;
iter
->
flags
=
flags
;
iter
->
k
.
p
=
pos
;
iter
->
snapshot
=
pos
.
snapshot
;
iter
->
pos
=
pos
;
iter
->
k
=
POS_KEY
(
pos
);
iter
->
journal_idx
=
0
;
iter
->
journal_pos
=
POS_MIN
;
#ifdef CONFIG_BCACHEFS_DEBUG
#ifdef CONFIG_BCACHEFS_DEBUG
iter
->
ip_allocated
=
ip
;
iter
->
ip_allocated
=
ip
;
#endif
#endif
...
...
fs/bcachefs/btree_types.h
View file @
1ae8a090
...
@@ -287,8 +287,7 @@ struct btree_iter {
...
@@ -287,8 +287,7 @@ struct btree_iter {
struct
btree_path
*
key_cache_path
;
struct
btree_path
*
key_cache_path
;
enum
btree_id
btree_id
:
8
;
enum
btree_id
btree_id
:
8
;
unsigned
min_depth
:
3
;
u8
min_depth
;
unsigned
advanced
:
1
;
/* btree_iter_copy starts here: */
/* btree_iter_copy starts here: */
u16
flags
;
u16
flags
;
...
...
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