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
21629f53
Commit
21629f53
authored
Aug 22, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Update more code for KEY_TYPE_reflink_v
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
e14f4ab4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
fs/bcachefs/extents.c
fs/bcachefs/extents.c
+10
-13
No files found.
fs/bcachefs/extents.c
View file @
21629f53
...
@@ -45,7 +45,8 @@ unsigned bch2_bkey_nr_dirty_ptrs(struct bkey_s_c k)
...
@@ -45,7 +45,8 @@ unsigned bch2_bkey_nr_dirty_ptrs(struct bkey_s_c k)
switch
(
k
.
k
->
type
)
{
switch
(
k
.
k
->
type
)
{
case
KEY_TYPE_btree_ptr
:
case
KEY_TYPE_btree_ptr
:
case
KEY_TYPE_extent
:
{
case
KEY_TYPE_extent
:
case
KEY_TYPE_reflink_v
:
{
struct
bkey_ptrs_c
p
=
bch2_bkey_ptrs_c
(
k
);
struct
bkey_ptrs_c
p
=
bch2_bkey_ptrs_c
(
k
);
const
struct
bch_extent_ptr
*
ptr
;
const
struct
bch_extent_ptr
*
ptr
;
...
@@ -308,20 +309,15 @@ bch2_extent_has_group(struct bch_fs *c, struct bkey_s_c_extent e, unsigned group
...
@@ -308,20 +309,15 @@ bch2_extent_has_group(struct bch_fs *c, struct bkey_s_c_extent e, unsigned group
unsigned
bch2_extent_is_compressed
(
struct
bkey_s_c
k
)
unsigned
bch2_extent_is_compressed
(
struct
bkey_s_c
k
)
{
{
struct
bkey_ptrs_c
ptrs
=
bch2_bkey_ptrs_c
(
k
);
const
union
bch_extent_entry
*
entry
;
struct
extent_ptr_decoded
p
;
unsigned
ret
=
0
;
unsigned
ret
=
0
;
switch
(
k
.
k
->
type
)
{
bkey_for_each_ptr_decode
(
k
.
k
,
ptrs
,
p
,
entry
)
case
KEY_TYPE_extent
:
{
if
(
!
p
.
ptr
.
cached
&&
struct
bkey_s_c_extent
e
=
bkey_s_c_to_extent
(
k
);
p
.
crc
.
compression_type
!=
BCH_COMPRESSION_NONE
)
const
union
bch_extent_entry
*
entry
;
ret
+=
p
.
crc
.
compressed_size
;
struct
extent_ptr_decoded
p
;
extent_for_each_ptr_decode
(
e
,
p
,
entry
)
if
(
!
p
.
ptr
.
cached
&&
p
.
crc
.
compression_type
!=
BCH_COMPRESSION_NONE
)
ret
+=
p
.
crc
.
compressed_size
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -969,6 +965,7 @@ static int __bch2_extent_atomic_end(struct btree_trans *trans,
...
@@ -969,6 +965,7 @@ static int __bch2_extent_atomic_end(struct btree_trans *trans,
switch
(
k
.
k
->
type
)
{
switch
(
k
.
k
->
type
)
{
case
KEY_TYPE_extent
:
case
KEY_TYPE_extent
:
case
KEY_TYPE_reflink_v
:
*
nr_iters
+=
bch2_bkey_nr_alloc_ptrs
(
k
);
*
nr_iters
+=
bch2_bkey_nr_alloc_ptrs
(
k
);
if
(
*
nr_iters
>=
max_iters
)
{
if
(
*
nr_iters
>=
max_iters
)
{
...
...
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