diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-01 23:56:27 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-21 17:39:48 +0200 |
commit | 6b812f1dcebfee45d9ef6856404fa666797ac979 (patch) | |
tree | 70816d129053b842400c23eea0568038f91ff6ae /fs/bcachefs/super.c | |
parent | bcachefs: Move tabstop setup to bch2_dev_usage_to_text() (diff) | |
download | linux-6b812f1dcebfee45d9ef6856404fa666797ac979.tar.xz linux-6b812f1dcebfee45d9ef6856404fa666797ac979.zip |
bcachefs: bch2_dev_remove_alloc() -> alloc_background.c
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/super.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index d8adf465f8b8..7dba46e97fbd 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -1592,33 +1592,6 @@ int bch2_dev_set_state(struct bch_fs *c, struct bch_dev *ca, /* Device add/removal: */ -static int bch2_dev_remove_alloc(struct bch_fs *c, struct bch_dev *ca) -{ - struct bpos start = POS(ca->dev_idx, 0); - struct bpos end = POS(ca->dev_idx, U64_MAX); - int ret; - - /* - * We clear the LRU and need_discard btrees first so that we don't race - * with bch2_do_invalidates() and bch2_do_discards() - */ - ret = bch2_btree_delete_range(c, BTREE_ID_lru, start, end, - BTREE_TRIGGER_norun, NULL) ?: - bch2_btree_delete_range(c, BTREE_ID_need_discard, start, end, - BTREE_TRIGGER_norun, NULL) ?: - bch2_btree_delete_range(c, BTREE_ID_freespace, start, end, - BTREE_TRIGGER_norun, NULL) ?: - bch2_btree_delete_range(c, BTREE_ID_backpointers, start, end, - BTREE_TRIGGER_norun, NULL) ?: - bch2_btree_delete_range(c, BTREE_ID_alloc, start, end, - BTREE_TRIGGER_norun, NULL) ?: - bch2_btree_delete_range(c, BTREE_ID_bucket_gens, start, end, - BTREE_TRIGGER_norun, NULL) ?: - bch2_dev_usage_remove(c, ca->dev_idx); - bch_err_msg(c, ret, "removing dev alloc info"); - return ret; -} - int bch2_dev_remove(struct bch_fs *c, struct bch_dev *ca, int flags) { struct bch_member *m; |