btrfs: keep the old resume filters for balance items without a vrange
This patch is optional. It is offered so that reviewers can take it or
drop it; the author's preference is to drop it. The previous patches do
not depend on it.
A balance item written by a kernel without the vrange bound has no vrange
filter. With the previous patch alone, a balance that was paused or
interrupted on such a kernel and is resumed on a new one restarts from
the beginning: every block group the original request selects is
relocated again, including the ones the interrupted run created.
This patch restores the old resume adjustments for exactly those items.
When a chunk type has no vrange filter in the stored item, the resume
changes its arguments as before: it adds the soft filter if the type is
being converted, and usage=90 if it has no usage, usage range or convert
filter. This is decided when the item is recovered at mount, before
the previous patch adds the bound, and is written back with the bound.
A chunk type with a vrange, which is every balance started by a kernel
with the previous patch and any balance the user gave a vrange, relies
on the vrange and is resumed unchanged.
The trade-off: the legacy resume neither completes the original request
(block groups more than 90% full are skipped, and so are the ones being
converted that already had the target profile) nor avoids much work on a
filesystem that is more than 90% full, and keeping it adds a layer of
surprising behavior and code for a case that only arises once, when a
balance spans the kernel upgrade. Without it, such a balance repeats
work but skips nothing.