bcachefs: Fix deletion in __bch2_dev_usrdata_drop()
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 12 Oct 2021 18:25:13 +0000 (14:25 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:13 +0000 (17:09 -0400)
commit776eaddb2cef366b16dac8857899dbb4cc5dfdb1
treec127b190ca5eb942cd7570a88e779235cf819e08
parent395576807555fa9ffb2ae038cae1fe2699f85b89
bcachefs: Fix deletion in __bch2_dev_usrdata_drop()

With snapshots, __bch2_dev_usr_data_drop() now uses an ALL_SNAPSHOTS
iterator, which isn't an extent iterator - meaning we shouldn't be
inserting whiteouts with nonzero size to delete. This fixes a bug where
we go RO because we tried to insert an invalid key in the device remove
path.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/migrate.c