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
2a912a9a
Commit
2a912a9a
authored
Mar 05, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Kill bch2_ec_bucket_written()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
81c771b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
20 deletions
+17
-20
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.c
+2
-2
fs/bcachefs/ec.c
fs/bcachefs/ec.c
+0
-17
fs/bcachefs/ec.h
fs/bcachefs/ec.h
+15
-1
No files found.
fs/bcachefs/alloc_foreground.c
View file @
2a912a9a
...
...
@@ -97,7 +97,7 @@ void __bch2_open_bucket_put(struct bch_fs *c, struct open_bucket *ob)
struct
bch_dev
*
ca
=
bch_dev_bkey_exists
(
c
,
ob
->
dev
);
if
(
ob
->
ec
)
{
bch2_ec_bucket_written
(
c
,
ob
);
ec_stripe_new_put
(
c
,
ob
->
ec
);
return
;
}
...
...
@@ -838,10 +838,10 @@ static int bucket_alloc_from_stripe(struct btree_trans *trans,
ob
->
ec_idx
=
ec_idx
;
ob
->
ec
=
h
->
s
;
ec_stripe_new_get
(
h
->
s
);
add_new_bucket
(
c
,
ptrs
,
devs_may_alloc
,
nr_effective
,
have_cache
,
flags
,
ob
);
atomic_inc
(
&
h
->
s
->
pin
);
out_put_head:
bch2_ec_stripe_head_put
(
c
,
h
);
return
0
;
...
...
fs/bcachefs/ec.c
View file @
2a912a9a
...
...
@@ -1193,15 +1193,6 @@ void bch2_ec_do_stripe_creates(struct bch_fs *c)
bch2_write_ref_put
(
c
,
BCH_WRITE_REF_stripe_create
);
}
static
void
ec_stripe_new_put
(
struct
bch_fs
*
c
,
struct
ec_stripe_new
*
s
)
{
BUG_ON
(
atomic_read
(
&
s
->
pin
)
<=
0
);
BUG_ON
(
!
s
->
err
&&
!
s
->
idx
);
if
(
atomic_dec_and_test
(
&
s
->
pin
))
bch2_ec_do_stripe_creates
(
c
);
}
static
void
ec_stripe_set_pending
(
struct
bch_fs
*
c
,
struct
ec_stripe_head
*
h
)
{
struct
ec_stripe_new
*
s
=
h
->
s
;
...
...
@@ -1218,14 +1209,6 @@ static void ec_stripe_set_pending(struct bch_fs *c, struct ec_stripe_head *h)
ec_stripe_new_put
(
c
,
s
);
}
/* have a full bucket - hand it off to be erasure coded: */
void
bch2_ec_bucket_written
(
struct
bch_fs
*
c
,
struct
open_bucket
*
ob
)
{
struct
ec_stripe_new
*
s
=
ob
->
ec
;
ec_stripe_new_put
(
c
,
s
);
}
void
bch2_ec_bucket_cancel
(
struct
bch_fs
*
c
,
struct
open_bucket
*
ob
)
{
struct
ec_stripe_new
*
s
=
ob
->
ec
;
...
...
fs/bcachefs/ec.h
View file @
2a912a9a
...
...
@@ -198,7 +198,6 @@ int bch2_ec_read_extent(struct bch_fs *, struct bch_read_bio *);
void
*
bch2_writepoint_ec_buf
(
struct
bch_fs
*
,
struct
write_point
*
);
void
bch2_ec_bucket_written
(
struct
bch_fs
*
,
struct
open_bucket
*
);
void
bch2_ec_bucket_cancel
(
struct
bch_fs
*
,
struct
open_bucket
*
);
int
bch2_ec_stripe_new_alloc
(
struct
bch_fs
*
,
struct
ec_stripe_head
*
);
...
...
@@ -213,6 +212,21 @@ void bch2_stripes_heap_del(struct bch_fs *, struct stripe *, size_t);
void
bch2_stripes_heap_insert
(
struct
bch_fs
*
,
struct
stripe
*
,
size_t
);
void
bch2_do_stripe_deletes
(
struct
bch_fs
*
);
void
bch2_ec_do_stripe_creates
(
struct
bch_fs
*
);
static
inline
void
ec_stripe_new_get
(
struct
ec_stripe_new
*
s
)
{
atomic_inc
(
&
s
->
pin
);
}
static
inline
void
ec_stripe_new_put
(
struct
bch_fs
*
c
,
struct
ec_stripe_new
*
s
)
{
BUG_ON
(
atomic_read
(
&
s
->
pin
)
<=
0
);
BUG_ON
(
!
s
->
err
&&
!
s
->
idx
);
if
(
atomic_dec_and_test
(
&
s
->
pin
))
bch2_ec_do_stripe_creates
(
c
);
}
void
bch2_ec_stop_dev
(
struct
bch_fs
*
,
struct
bch_dev
*
);
...
...
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