aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs.c
diff options
context:
space:
mode:
authorGravatar Brian Foster <bfoster@redhat.com> 2023-05-30 14:51:12 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:10:03 -0400
commit5bc740820e7ae01b26a4dbb612df086f41f79785 (patch)
treeb4da8bba80d561cc37edcafe2294cf9caf1e1546 /fs/bcachefs/fs.c
parentbcachefs: push rcu lock down into bch2_target_to_mask() (diff)
downloadlinux-5bc740820e7ae01b26a4dbb612df086f41f79785.tar.gz
linux-5bc740820e7ae01b26a4dbb612df086f41f79785.tar.bz2
linux-5bc740820e7ae01b26a4dbb612df086f41f79785.zip
bcachefs: don't spin in rebalance when background target is not usable
If a bcachefs filesystem is configured with a background device (disk group), rebalance will relocate data to this device in the background by checking extent keys for whether they currently reside in the specified target. For keys that do not, rebalance performs a read/write cycle to allow the write path to properly relocate data. If the background target is not usable (read-only, for example), however, the write path doesn't actually move data to another device. Instead, rebalance spins indefinitely reading and rewriting the same data over and over to the same device. If the background target is made available again, the rebalance picks this up, relocates the data, and eventually terminates. To avoid this spinning behavior, update the rebalance background target logic to not only check whether the extent is not in the target, but whether the target is actually usable as well. If not, then don't mark the key for rewrite. Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
0 files changed, 0 insertions, 0 deletions