]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: limit max discard size for async discard
authorDennis Zhou <dennis@kernel.org>
Thu, 2 Jan 2020 21:26:37 +0000 (16:26 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 20 Jan 2020 15:40:59 +0000 (16:40 +0100)
commit1ad2d271a9a50b5e77c61eb527acc8b0428b2d10
tree77badf26527c9d58896c8d14f3f906109aff668d
parent2b5b0a0fe5ff0318eb3963bad60c979a66e01038
btrfs: limit max discard size for async discard

Throttle the maximum size of a discard so that we can provide an upper
bound for the rate of async discard. While the block layer is able to
split discards into the appropriate sized discards, we want to be able
to account more accurately the rate at which we are consuming NCQ slots
as well as limit the upper bound of work for a discard.

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/discard.h
fs/btrfs/free-space-cache.c