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
ad8b68cd
Commit
ad8b68cd
authored
Jul 03, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_data_update_to_text()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
0f1f7324
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
25 deletions
+39
-25
fs/bcachefs/data_update.c
fs/bcachefs/data_update.c
+34
-0
fs/bcachefs/data_update.h
fs/bcachefs/data_update.h
+5
-0
fs/bcachefs/move.c
fs/bcachefs/move.c
+0
-25
No files found.
fs/bcachefs/data_update.c
View file @
ad8b68cd
...
...
@@ -5,7 +5,9 @@
#include "bkey_buf.h"
#include "btree_update.h"
#include "buckets.h"
#include "compress.h"
#include "data_update.h"
#include "disk_groups.h"
#include "ec.h"
#include "error.h"
#include "extents.h"
...
...
@@ -454,6 +456,38 @@ static void bch2_update_unwritten_extent(struct btree_trans *trans,
}
}
void
bch2_data_update_opts_to_text
(
struct
printbuf
*
out
,
struct
bch_fs
*
c
,
struct
bch_io_opts
*
io_opts
,
struct
data_update_opts
*
data_opts
)
{
printbuf_tabstop_push
(
out
,
20
);
prt_str
(
out
,
"rewrite ptrs:
\t
"
);
bch2_prt_u64_base2
(
out
,
data_opts
->
rewrite_ptrs
);
prt_newline
(
out
);
prt_str
(
out
,
"kill ptrs:
\t
"
);
bch2_prt_u64_base2
(
out
,
data_opts
->
kill_ptrs
);
prt_newline
(
out
);
prt_str
(
out
,
"target:
\t
"
);
bch2_target_to_text
(
out
,
c
,
data_opts
->
target
);
prt_newline
(
out
);
prt_str
(
out
,
"compression:
\t
"
);
bch2_compression_opt_to_text
(
out
,
background_compression
(
*
io_opts
));
prt_newline
(
out
);
prt_str
(
out
,
"extra replicas:
\t
"
);
prt_u64
(
out
,
data_opts
->
extra_replicas
);
}
void
bch2_data_update_to_text
(
struct
printbuf
*
out
,
struct
data_update
*
m
)
{
bch2_bkey_val_to_text
(
out
,
m
->
op
.
c
,
bkey_i_to_s_c
(
m
->
k
.
k
));
prt_newline
(
out
);
bch2_data_update_opts_to_text
(
out
,
m
->
op
.
c
,
&
m
->
op
.
opts
,
&
m
->
data_opts
);
}
int
bch2_extent_drop_ptrs
(
struct
btree_trans
*
trans
,
struct
btree_iter
*
iter
,
struct
bkey_s_c
k
,
...
...
fs/bcachefs/data_update.h
View file @
ad8b68cd
...
...
@@ -17,6 +17,9 @@ struct data_update_opts {
unsigned
write_flags
;
};
void
bch2_data_update_opts_to_text
(
struct
printbuf
*
,
struct
bch_fs
*
,
struct
bch_io_opts
*
,
struct
data_update_opts
*
);
struct
data_update
{
/* extent being updated: */
enum
btree_id
btree_id
;
...
...
@@ -27,6 +30,8 @@ struct data_update {
struct
bch_write_op
op
;
};
void
bch2_data_update_to_text
(
struct
printbuf
*
,
struct
data_update
*
);
int
bch2_data_update_index_update
(
struct
bch_write_op
*
);
void
bch2_data_update_read_done
(
struct
data_update
*
,
...
...
fs/bcachefs/move.c
View file @
ad8b68cd
...
...
@@ -36,31 +36,6 @@ const char * const bch2_data_ops_strs[] = {
NULL
};
static
void
bch2_data_update_opts_to_text
(
struct
printbuf
*
out
,
struct
bch_fs
*
c
,
struct
bch_io_opts
*
io_opts
,
struct
data_update_opts
*
data_opts
)
{
printbuf_tabstop_push
(
out
,
20
);
prt_str
(
out
,
"rewrite ptrs:
\t
"
);
bch2_prt_u64_base2
(
out
,
data_opts
->
rewrite_ptrs
);
prt_newline
(
out
);
prt_str
(
out
,
"kill ptrs:
\t
"
);
bch2_prt_u64_base2
(
out
,
data_opts
->
kill_ptrs
);
prt_newline
(
out
);
prt_str
(
out
,
"target:
\t
"
);
bch2_target_to_text
(
out
,
c
,
data_opts
->
target
);
prt_newline
(
out
);
prt_str
(
out
,
"compression:
\t
"
);
bch2_compression_opt_to_text
(
out
,
background_compression
(
*
io_opts
));
prt_newline
(
out
);
prt_str
(
out
,
"extra replicas:
\t
"
);
prt_u64
(
out
,
data_opts
->
extra_replicas
);
}
static
void
trace_move_extent2
(
struct
bch_fs
*
c
,
struct
bkey_s_c
k
,
struct
bch_io_opts
*
io_opts
,
struct
data_update_opts
*
data_opts
)
...
...
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