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
1a2a9f9f
Commit
1a2a9f9f
authored
Dec 21, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: for_each_keylist_key() declares loop iter
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
0beebd92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
13 deletions
+4
-13
fs/bcachefs/btree_update_interior.c
fs/bcachefs/btree_update_interior.c
+0
-2
fs/bcachefs/io_write.c
fs/bcachefs/io_write.c
+3
-6
fs/bcachefs/keylist.c
fs/bcachefs/keylist.c
+0
-2
fs/bcachefs/keylist.h
fs/bcachefs/keylist.h
+1
-3
No files found.
fs/bcachefs/btree_update_interior.c
View file @
1a2a9f9f
...
...
@@ -556,8 +556,6 @@ static void btree_update_add_key(struct btree_update *as,
static
int
btree_update_nodes_written_trans
(
struct
btree_trans
*
trans
,
struct
btree_update
*
as
)
{
struct
bkey_i
*
k
;
struct
jset_entry
*
e
=
bch2_trans_jset_entry_alloc
(
trans
,
as
->
journal_u64s
);
int
ret
=
PTR_ERR_OR_ZERO
(
e
);
if
(
ret
)
...
...
fs/bcachefs/io_write.c
View file @
1a2a9f9f
...
...
@@ -1106,15 +1106,14 @@ static bool bch2_extent_is_writeable(struct bch_write_op *op,
static
inline
void
bch2_nocow_write_unlock
(
struct
bch_write_op
*
op
)
{
struct
bch_fs
*
c
=
op
->
c
;
struct
bkey_i
*
k
;
for_each_keylist_key
(
&
op
->
insert_keys
,
k
)
{
struct
bkey_ptrs_c
ptrs
=
bch2_bkey_ptrs_c
(
bkey_i_to_s_c
(
k
));
bkey_for_each_ptr
(
ptrs
,
ptr
)
bch2_bucket_nocow_unlock
(
&
c
->
nocow_locks
,
PTR_BUCKET_POS
(
c
,
ptr
),
BUCKET_NOCOW_LOCK_UPDATE
);
PTR_BUCKET_POS
(
c
,
ptr
),
BUCKET_NOCOW_LOCK_UPDATE
);
}
}
...
...
@@ -1158,11 +1157,9 @@ static void bch2_nocow_write_convert_unwritten(struct bch_write_op *op)
{
struct
bch_fs
*
c
=
op
->
c
;
struct
btree_trans
*
trans
=
bch2_trans_get
(
c
);
struct
bkey_i
*
orig
;
int
ret
;
for_each_keylist_key
(
&
op
->
insert_keys
,
orig
)
{
ret
=
for_each_btree_key_upto_commit
(
trans
,
iter
,
BTREE_ID_extents
,
int
ret
=
for_each_btree_key_upto_commit
(
trans
,
iter
,
BTREE_ID_extents
,
bkey_start_pos
(
&
orig
->
k
),
orig
->
k
.
p
,
BTREE_ITER_INTENT
,
k
,
NULL
,
NULL
,
BCH_TRANS_COMMIT_no_enospc
,
({
...
...
fs/bcachefs/keylist.c
View file @
1a2a9f9f
...
...
@@ -43,8 +43,6 @@ void bch2_keylist_pop_front(struct keylist *l)
#ifdef CONFIG_BCACHEFS_DEBUG
void
bch2_verify_keylist_sorted
(
struct
keylist
*
l
)
{
struct
bkey_i
*
k
;
for_each_keylist_key
(
l
,
k
)
BUG_ON
(
bkey_next
(
k
)
!=
l
->
top
&&
bpos_ge
(
k
->
k
.
p
,
bkey_next
(
k
)
->
k
.
p
));
...
...
fs/bcachefs/keylist.h
View file @
1a2a9f9f
...
...
@@ -50,18 +50,16 @@ static inline struct bkey_i *bch2_keylist_front(struct keylist *l)
}
#define for_each_keylist_key(_keylist, _k) \
for (
_k = (_keylist)->keys;
\
for (
struct bkey_i *_k = (_keylist)->keys;
\
_k != (_keylist)->top; \
_k = bkey_next(_k))
static
inline
u64
keylist_sectors
(
struct
keylist
*
keys
)
{
struct
bkey_i
*
k
;
u64
ret
=
0
;
for_each_keylist_key
(
keys
,
k
)
ret
+=
k
->
k
.
size
;
return
ret
;
}
...
...
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