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
ae469056
Commit
ae469056
authored
Aug 28, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Rename BCH_WRITE_DONE -> BCH_WRITE_SUBMITTED
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
1d18b5ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
fs/bcachefs/io_write.c
fs/bcachefs/io_write.c
+12
-12
fs/bcachefs/io_write.h
fs/bcachefs/io_write.h
+1
-1
No files found.
fs/bcachefs/io_write.c
View file @
ae469056
...
...
@@ -554,7 +554,7 @@ static void __bch2_write_index(struct bch_write_op *op)
err:
keys
->
top
=
keys
->
keys
;
op
->
error
=
ret
;
op
->
flags
|=
BCH_WRITE_
DONE
;
op
->
flags
|=
BCH_WRITE_
SUBMITTED
;
goto
out
;
}
...
...
@@ -589,7 +589,7 @@ static CLOSURE_CALLBACK(bch2_write_index)
struct
workqueue_struct
*
wq
=
index_update_wq
(
op
);
unsigned
long
flags
;
if
((
op
->
flags
&
BCH_WRITE_
DONE
)
&&
if
((
op
->
flags
&
BCH_WRITE_
SUBMITTED
)
&&
(
op
->
flags
&
BCH_WRITE_MOVE
))
bch2_bio_free_pages_pool
(
op
->
c
,
&
op
->
wbio
.
bio
);
...
...
@@ -634,7 +634,7 @@ void bch2_write_point_do_index_updates(struct work_struct *work)
__bch2_write_index
(
op
);
if
(
!
(
op
->
flags
&
BCH_WRITE_
DONE
))
if
(
!
(
op
->
flags
&
BCH_WRITE_
SUBMITTED
))
__bch2_write
(
op
);
else
bch2_write_done
(
&
op
->
cl
);
...
...
@@ -1318,7 +1318,7 @@ static void bch2_nocow_write(struct bch_write_op *op)
wbio_init
(
bio
)
->
put_bio
=
true
;
bio
->
bi_opf
=
op
->
wbio
.
bio
.
bi_opf
;
}
else
{
op
->
flags
|=
BCH_WRITE_
DONE
;
op
->
flags
|=
BCH_WRITE_
SUBMITTED
;
}
op
->
pos
.
offset
+=
bio_sectors
(
bio
);
...
...
@@ -1332,7 +1332,7 @@ static void bch2_nocow_write(struct bch_write_op *op)
op
->
insert_keys
.
top
,
true
);
bch2_keylist_push
(
&
op
->
insert_keys
);
if
(
op
->
flags
&
BCH_WRITE_
DONE
)
if
(
op
->
flags
&
BCH_WRITE_
SUBMITTED
)
break
;
bch2_btree_iter_advance
(
&
iter
);
}
...
...
@@ -1347,14 +1347,14 @@ static void bch2_nocow_write(struct bch_write_op *op)
op
->
pos
.
inode
,
op
->
pos
.
offset
<<
9
,
"%s: btree lookup error %s"
,
__func__
,
bch2_err_str
(
ret
));
op
->
error
=
ret
;
op
->
flags
|=
BCH_WRITE_
DONE
;
op
->
flags
|=
BCH_WRITE_
SUBMITTED
;
}
bch2_trans_put
(
trans
);
darray_exit
(
&
buckets
);
/* fallback to cow write path? */
if
(
!
(
op
->
flags
&
BCH_WRITE_
DONE
))
{
if
(
!
(
op
->
flags
&
BCH_WRITE_
SUBMITTED
))
{
closure_sync
(
&
op
->
cl
);
__bch2_nocow_write_done
(
op
);
op
->
insert_keys
.
top
=
op
->
insert_keys
.
keys
;
...
...
@@ -1410,7 +1410,7 @@ static void __bch2_write(struct bch_write_op *op)
if
(
unlikely
(
op
->
opts
.
nocow
&&
c
->
opts
.
nocow_enabled
))
{
bch2_nocow_write
(
op
);
if
(
op
->
flags
&
BCH_WRITE_
DONE
)
if
(
op
->
flags
&
BCH_WRITE_
SUBMITTED
)
goto
out_nofs_restore
;
}
again:
...
...
@@ -1465,7 +1465,7 @@ static void __bch2_write(struct bch_write_op *op)
bch2_alloc_sectors_done_inlined
(
c
,
wp
);
err:
if
(
ret
<=
0
)
{
op
->
flags
|=
BCH_WRITE_
DONE
;
op
->
flags
|=
BCH_WRITE_
SUBMITTED
;
if
(
ret
<
0
)
{
if
(
!
(
op
->
flags
&
BCH_WRITE_ALLOC_NOWAIT
))
...
...
@@ -1501,7 +1501,7 @@ static void __bch2_write(struct bch_write_op *op)
* once, as that signals backpressure to the caller.
*/
if
((
op
->
flags
&
BCH_WRITE_SYNC
)
||
(
!
(
op
->
flags
&
BCH_WRITE_
DONE
)
&&
(
!
(
op
->
flags
&
BCH_WRITE_
SUBMITTED
)
&&
!
(
op
->
flags
&
BCH_WRITE_IN_WORKER
)))
{
if
(
closure_sync_timeout
(
&
op
->
cl
,
HZ
*
10
))
{
bch2_print_allocator_stuck
(
c
);
...
...
@@ -1510,7 +1510,7 @@ static void __bch2_write(struct bch_write_op *op)
__bch2_write_index
(
op
);
if
(
!
(
op
->
flags
&
BCH_WRITE_
DONE
))
if
(
!
(
op
->
flags
&
BCH_WRITE_
SUBMITTED
))
goto
again
;
bch2_write_done
(
&
op
->
cl
);
}
else
{
...
...
@@ -1532,7 +1532,7 @@ static void bch2_write_data_inline(struct bch_write_op *op, unsigned data_len)
memset
(
&
op
->
failed
,
0
,
sizeof
(
op
->
failed
));
op
->
flags
|=
BCH_WRITE_WROTE_DATA_INLINE
;
op
->
flags
|=
BCH_WRITE_
DONE
;
op
->
flags
|=
BCH_WRITE_
SUBMITTED
;
bch2_check_set_feature
(
op
->
c
,
BCH_FEATURE_inline_data
);
...
...
fs/bcachefs/io_write.h
View file @
ae469056
...
...
@@ -33,7 +33,7 @@ void bch2_submit_wbio_replicas(struct bch_write_bio *, struct bch_fs *,
x(SYNC) \
x(MOVE) \
x(IN_WORKER) \
x(
DONE)
\
x(
SUBMITTED)
\
x(IO_ERROR) \
x(CONVERT_UNWRITTEN)
...
...
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