summaryrefslogtreecommitdiff
path: root/fs/bcachefs/move.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-11 20:38:46 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:57 -0400
commitb9fa375bab2786d0d2c5435b5e3fceaf6594aaf3 (patch)
tree68feec1dff3f2f09c16d2803566812b23d762c3e /fs/bcachefs/move.h
parent65d48e35250fe46a560dffa13876830336b152c9 (diff)
bcachefs: bch2_fs_moving_ctxts_to_text()
This also adds bch2_write_op_to_text(): now we can see outstand moves, useful for debugging shutdown with the upcoming BCH_WRITE_WAIT_FOR_EC and likely for other things in the future. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/move.h')
-rw-r--r--fs/bcachefs/move.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/bcachefs/move.h b/fs/bcachefs/move.h
index 4c0013872347..50a6f7d7a292 100644
--- a/fs/bcachefs/move.h
+++ b/fs/bcachefs/move.h
@@ -11,6 +11,9 @@ struct bch_read_bio;
struct moving_context {
struct bch_fs *c;
+ struct list_head list;
+ void *fn;
+
struct bch_ratelimit *rate;
struct bch_move_stats *stats;
struct write_point_specifier wp;
@@ -19,7 +22,10 @@ struct moving_context {
/* For waiting on outstanding reads and writes: */
struct closure cl;
+
+ struct mutex lock;
struct list_head reads;
+ struct list_head ios;
/* in flight sectors: */
atomic_t read_sectors;
@@ -84,6 +90,9 @@ int bch2_data_job(struct bch_fs *,
struct bch_ioctl_data);
void bch2_move_stats_init(struct bch_move_stats *stats, char *name);
+void bch2_data_jobs_to_text(struct printbuf *, struct bch_fs *);
+void bch2_fs_moving_ctxts_to_text(struct printbuf *, struct bch_fs *);
+void bch2_fs_move_init(struct bch_fs *);
#endif /* _BCACHEFS_MOVE_H */