diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2021-04-19 10:41:00 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-04-20 21:25:16 +0300 |
commit | 01e86008aaa534867a7fb0fcbc116ab085e2b2c6 (patch) | |
tree | b40926b889cb821637ea63efd241e35e85a90e91 /lib/mpi/mpi-sub-ui.c | |
parent | e9306ad4ef5c2a09dcb5bf22ba71d1a969de8355 (diff) | |
download | linux-01e86008aaa534867a7fb0fcbc116ab085e2b2c6.tar.xz |
btrfs: zoned: reset zones of relocated block groups
When relocating a block group the freed up space is not discarded in one
big block, but each extent is discarded on its own with -odisard=sync.
For a zoned filesystem we need to discard the whole block group at once,
so btrfs_discard_extent() will translate the discard into a
REQ_OP_ZONE_RESET operation, which then resets the device's zone.
Failure to reset the zone is not fatal error.
Discussion about the approach and regarding transaction blocking:
https://lore.kernel.org/linux-btrfs/CAL3q7H4SjS_d5rBepfTMhU8Th3bJzdmyYd0g4Z60yUgC_rC_ZA@mail.gmail.com/
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions