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
a9ec3454
Commit
a9ec3454
authored
Nov 18, 2018
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Journal refactoring
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
f1a79365
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
230 deletions
+124
-230
fs/bcachefs/journal.c
fs/bcachefs/journal.c
+2
-6
fs/bcachefs/journal_io.c
fs/bcachefs/journal_io.c
+120
-222
fs/bcachefs/journal_reclaim.c
fs/bcachefs/journal_reclaim.c
+2
-1
fs/bcachefs/journal_types.h
fs/bcachefs/journal_types.h
+0
-1
No files found.
fs/bcachefs/journal.c
View file @
a9ec3454
...
...
@@ -134,6 +134,8 @@ static enum {
c
->
opts
.
block_size
;
BUG_ON
(
j
->
prev_buf_sectors
>
j
->
cur_buf_sectors
);
bkey_extent_init
(
&
buf
->
key
);
/*
* We have to set last_seq here, _before_ opening a new journal entry:
*
...
...
@@ -890,10 +892,6 @@ static bool bch2_journal_writing_to_device(struct journal *j, unsigned dev_idx)
void
bch2_dev_journal_stop
(
struct
journal
*
j
,
struct
bch_dev
*
ca
)
{
spin_lock
(
&
j
->
lock
);
bch2_extent_drop_device
(
bkey_i_to_s_extent
(
&
j
->
key
),
ca
->
dev_idx
);
spin_unlock
(
&
j
->
lock
);
wait_event
(
j
->
wait
,
!
bch2_journal_writing_to_device
(
j
,
ca
->
dev_idx
));
}
...
...
@@ -1032,8 +1030,6 @@ int bch2_fs_journal_init(struct journal *j)
j
->
write_delay_ms
=
1000
;
j
->
reclaim_delay_ms
=
100
;
bkey_extent_init
(
&
j
->
key
);
atomic64_set
(
&
j
->
reservations
.
counter
,
((
union
journal_res_state
)
{
.
cur_entry_offset
=
JOURNAL_ENTRY_CLOSED_VAL
}).
v
);
...
...
fs/bcachefs/journal_io.c
View file @
a9ec3454
This diff is collapsed.
Click to expand it.
fs/bcachefs/journal_reclaim.c
View file @
a9ec3454
...
...
@@ -126,7 +126,8 @@ void bch2_journal_reclaim_fast(struct journal *j)
* Unpin journal entries whose reference counts reached zero, meaning
* all btree nodes got written out
*/
while
(
!
atomic_read
(
&
fifo_peek_front
(
&
j
->
pin
).
count
))
{
while
(
!
fifo_empty
(
&
j
->
pin
)
&&
!
atomic_read
(
&
fifo_peek_front
(
&
j
->
pin
).
count
))
{
BUG_ON
(
!
list_empty
(
&
fifo_peek_front
(
&
j
->
pin
).
list
));
BUG_ON
(
!
fifo_pop
(
&
j
->
pin
,
temp
));
popped
=
true
;
...
...
fs/bcachefs/journal_types.h
View file @
a9ec3454
...
...
@@ -185,7 +185,6 @@ struct journal {
struct
list_head
seq_blacklist
;
struct
journal_seq_blacklist
*
new_blacklist
;
BKEY_PADDED
(
key
);
struct
write_point
wp
;
spinlock_t
err_lock
;
...
...
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