]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: only keep track of data extents for async discard
authorDennis Zhou <dennis@kernel.org>
Thu, 2 Jan 2020 21:26:40 +0000 (16:26 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 20 Jan 2020 15:41:00 +0000 (16:41 +0100)
commit60a1c6a68b9d54e9ba41ec7c2c3ecf6a17f44796
tree455bdaaea5d27255726977fd7d8beefc8897d0db
parent90374699efba91a12fc65ced980166ebb8c54568
btrfs: only keep track of data extents for async discard

As mentioned earlier, discarding data can be done either by issuing an
explicit discard or implicitly by reusing the LBA. Metadata block_groups
see much more frequent reuse due to well it being metadata. So instead
of explicitly discarding metadata block_groups, just leave them be and
let the latter implicit discarding be done for them.

For mixed block_groups, block_groups which contain both metadata and
data, we let them be as higher fragmentation is expected.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.h
fs/btrfs/discard.c