summaryrefslogtreecommitdiff
path: root/fs/btrfs/delalloc-space.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-07-21 10:22:24 -0400
committerDavid Sterba <dsterba@suse.com>2020-10-07 12:06:52 +0200
commita1ed0a8216f7c7305ccfaa2c93b498f10b340ede (patch)
tree4726fecf4b5c05b91eaada40967a38c03d29a503 /fs/btrfs/delalloc-space.c
parent058e6d1d267fe9c7e072533d2e1469d93aec3ec7 (diff)
btrfs: add the data transaction commit logic into may_commit_transaction
Data space flushing currently unconditionally commits the transaction twice in a row, and the last time it checks if there's enough pinned extents to satisfy its reservation before deciding to commit the transaction for the 3rd and final time. Encode this logic into may_commit_transaction(). In the next patch we will pass in U64_MAX for bytes_needed the first two times, and the final time we will pass in the actual bytes we need so the normal logic will apply. This patch exists solely to make the logical changes I will make to the flushing state machine separate to make it easier to bisect any performance related regressions. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Tested-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/delalloc-space.c')
0 files changed, 0 insertions, 0 deletions