diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-10 20:31:34 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-15 17:36:15 -0400 |
commit | c8bec83e307f28751c433ba1d3f648429fb5a34c (patch) | |
tree | 6e70e0cf8f25117f706214d86a0689ee8495dca0 /libbcachefs/super.c | |
parent | 1c156d5c4667c1c2e2949b229dfef75696196d35 (diff) |
Update bcachefs sources to e14d7c7195 bcachefs: Compression levels
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r-- | libbcachefs/super.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c index 426d2acf..9f1047a7 100644 --- a/libbcachefs/super.c +++ b/libbcachefs/super.c @@ -344,6 +344,19 @@ static int bch2_fs_read_write_late(struct bch_fs *c) { int ret; + /* + * Data move operations can't run until after check_snapshots has + * completed, and bch2_snapshot_is_ancestor() is available. + * + * Ideally we'd start copygc/rebalance earlier instead of waiting for + * all of recovery/fsck to complete: + */ + ret = bch2_copygc_start(c); + if (ret) { + bch_err(c, "error starting copygc thread"); + return ret; + } + ret = bch2_rebalance_start(c); if (ret) { bch_err(c, "error starting rebalance thread"); @@ -403,12 +416,6 @@ static int __bch2_fs_read_write(struct bch_fs *c, bool early) return ret; } - ret = bch2_copygc_start(c); - if (ret) { - bch_err(c, "error starting copygc thread"); - return ret; - } - if (!early) { ret = bch2_fs_read_write_late(c); if (ret) |