summaryrefslogtreecommitdiff
path: root/include/linux/i2c/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2026-01-07 14:09:16 +0000
committerDavid Sterba <dsterba@suse.com>2026-02-03 07:54:36 +0100
commit7cddbb4339d4be16aa5341e3a27e63c34d2c4e0d (patch)
treeded9f248dc1683e81c6e1636aa4ecd1f6df0b684 /include/linux/i2c/git@git.tavy.me:linux.git
parent81e5a4551c32b454468f5aa3fe45dabb6bccb854 (diff)
btrfs: handle discarding fully-remapped block groups
Discard normally works by iterating over the free-space entries of a block group. This doesn't work for fully-remapped block groups, as we removed their free-space entries when we started relocation. For sync discard, call btrfs_discard_extent() when we commit the transaction in which the last identity remap was removed. For async discard, add a new function btrfs_trim_fully_remapped_block_group() to be called by the discard worker, which iterates over the block group's range using the normal async discard rules. Once we reach the end, remove the chunk's stripes and device extents to get back its free space. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Mark Harmstone <mark@harmstone.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions