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
3142e7ef
Commit
3142e7ef
authored
Jul 23, 2018
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: fix nbuckets usage on device resize
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
b29e197a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fs/bcachefs/buckets.c
fs/bcachefs/buckets.c
+3
-3
No files found.
fs/bcachefs/buckets.c
View file @
3142e7ef
...
@@ -818,9 +818,9 @@ int bch2_dev_buckets_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets)
...
@@ -818,9 +818,9 @@ int bch2_dev_buckets_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets)
size_t
btree_reserve
=
DIV_ROUND_UP
(
BTREE_NODE_RESERVE
,
size_t
btree_reserve
=
DIV_ROUND_UP
(
BTREE_NODE_RESERVE
,
ca
->
mi
.
bucket_size
/
c
->
opts
.
btree_node_size
);
ca
->
mi
.
bucket_size
/
c
->
opts
.
btree_node_size
);
/* XXX: these should be tunable */
/* XXX: these should be tunable */
size_t
reserve_none
=
max_t
(
size_t
,
4
,
ca
->
mi
.
nbuckets
>>
9
);
size_t
reserve_none
=
max_t
(
size_t
,
4
,
nbuckets
>>
9
);
size_t
copygc_reserve
=
max_t
(
size_t
,
16
,
ca
->
mi
.
nbuckets
>>
7
);
size_t
copygc_reserve
=
max_t
(
size_t
,
16
,
nbuckets
>>
7
);
size_t
free_inc_nr
=
max
(
max_t
(
size_t
,
16
,
ca
->
mi
.
nbuckets
>>
12
),
size_t
free_inc_nr
=
max
(
max_t
(
size_t
,
16
,
nbuckets
>>
12
),
btree_reserve
);
btree_reserve
);
bool
resize
=
ca
->
buckets
!=
NULL
,
bool
resize
=
ca
->
buckets
!=
NULL
,
start_copygc
=
ca
->
copygc_thread
!=
NULL
;
start_copygc
=
ca
->
copygc_thread
!=
NULL
;
...
...
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