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
ec35b304
Commit
ec35b304
authored
Mar 18, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Fix lost transaction restart error
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
a5860368
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.c
+6
-4
No files found.
fs/bcachefs/alloc_foreground.c
View file @
ec35b304
...
@@ -1356,16 +1356,18 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans,
...
@@ -1356,16 +1356,18 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans,
/* Don't retry from all devices if we're out of open buckets: */
/* Don't retry from all devices if we're out of open buckets: */
if
(
bch2_err_matches
(
ret
,
BCH_ERR_open_buckets_empty
))
{
if
(
bch2_err_matches
(
ret
,
BCH_ERR_open_buckets_empty
))
{
int
ret
=
open_bucket_add_buckets
(
trans
,
&
ptrs
,
wp
,
devs_have
,
int
ret
2
=
open_bucket_add_buckets
(
trans
,
&
ptrs
,
wp
,
devs_have
,
target
,
erasure_code
,
target
,
erasure_code
,
nr_replicas
,
&
nr_effective
,
nr_replicas
,
&
nr_effective
,
&
have_cache
,
watermark
,
&
have_cache
,
watermark
,
flags
,
cl
);
flags
,
cl
);
if
(
!
ret
||
if
(
!
ret2
||
bch2_err_matches
(
ret
,
BCH_ERR_transaction_restart
)
||
bch2_err_matches
(
ret2
,
BCH_ERR_transaction_restart
)
||
bch2_err_matches
(
ret
,
BCH_ERR_open_buckets_empty
))
bch2_err_matches
(
ret2
,
BCH_ERR_open_buckets_empty
))
{
ret
=
ret2
;
goto
alloc_done
;
goto
alloc_done
;
}
}
}
/*
/*
* Only try to allocate cache (durability = 0 devices) from the
* Only try to allocate cache (durability = 0 devices) from the
...
...
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