diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-09-09 16:09:20 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-09-14 11:28:41 -0400 |
commit | 6ad0fa30a9c5aafda1206a64ba1262796ed35457 (patch) | |
tree | d779ccee13ee4e8fa7a7b21e799dd6126a48274d /libbcachefs/migrate.c | |
parent | 0c6b9627a40559939ae58d305089c17dea7df5df (diff) |
Update bcachefs sources to 1c8d3fc41e72 bcachefs: fast_list.c is only required for async obj debugging
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/migrate.c')
-rw-r--r-- | libbcachefs/migrate.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libbcachefs/migrate.c b/libbcachefs/migrate.c index 8a3981e1..92edff50 100644 --- a/libbcachefs/migrate.c +++ b/libbcachefs/migrate.c @@ -84,13 +84,6 @@ static int bch2_dev_usrdata_drop_key(struct btree_trans *trans, return ret; /* - * If the new extent no longer has any pointers, bch2_extent_normalize() - * will do the appropriate thing with it (turning it into a - * KEY_TYPE_error key, or just a discard if it was a cached extent) - */ - bch2_extent_normalize(c, bkey_i_to_s(n)); - - /* * Since we're not inserting through an extent iterator * (BTREE_ITER_all_snapshots iterators aren't extent iterators), * we aren't using the extent overwrite path to delete, we're @@ -273,10 +266,15 @@ int bch2_dev_data_drop(struct bch_fs *c, unsigned dev_idx, unsigned flags, struct printbuf *err) { struct progress_indicator_state progress; + int ret; + bch2_progress_init(&progress, c, - BIT_ULL(BTREE_ID_extents)| - BIT_ULL(BTREE_ID_reflink)); + btree_has_data_ptrs_mask & ~BIT_ULL(BTREE_ID_stripes)); + + if ((ret = bch2_dev_usrdata_drop(c, &progress, dev_idx, flags, err))) + return ret; + + bch2_progress_init_inner(&progress, c, 0, ~0ULL); - return bch2_dev_usrdata_drop(c, &progress, dev_idx, flags, err) ?: - bch2_dev_metadata_drop(c, &progress, dev_idx, flags, err); + return bch2_dev_metadata_drop(c, &progress, dev_idx, flags, err); } |