summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/space-info.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-07-21 16:22:31 +0200
committerDavid Sterba <dsterba@suse.com>2020-10-07 12:06:53 +0200
commit327feeeb2e9bc68d2af1c581394ec6706f600bb9 (patch)
tree9631111ea05c6a629bfebd9ed6c2853aaef9ce82 /fs/btrfs/space-info.c
parentbtrfs: don't force commit if we are data (diff)
downloadlinux-327feeeb2e9bc68d2af1c581394ec6706f600bb9.tar.xz
linux-327feeeb2e9bc68d2af1c581394ec6706f600bb9.zip
btrfs: run delayed iputs before committing the transaction for data
Before we were waiting on iputs after we committed the transaction, but this doesn't really make much sense. We want to reclaim any space we may have in order to be more likely to commit the transaction, due to pinned space being added by running the delayed iputs. Fix this by making delayed iputs run before committing the transaction. 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/space-info.c')
-rw-r--r--fs/btrfs/space-info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index c229dffa46d8..6d82c444ceff 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -1022,8 +1022,8 @@ static const enum btrfs_flush_state evict_flush_states[] = {
static const enum btrfs_flush_state data_flush_states[] = {
FLUSH_DELALLOC_WAIT,
- COMMIT_TRANS,
RUN_DELAYED_IPUTS,
+ COMMIT_TRANS,
};
static void priority_reclaim_metadata_space(struct btrfs_fs_info *fs_info,