Message ID | 90d587ce068421771a24ab819969de3e498dce61.1611695838.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Improve preemptive ENOSPC flushing | expand |
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index e68cd73b4222..c3c586b33b4b 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -812,6 +812,13 @@ static bool need_preemptive_reclaim(struct btrfs_fs_info *fs_info, if ((space_info->bytes_used + space_info->bytes_reserved) >= thresh) return 0; + /* + * We have tickets queued, bail so we don't compete with the async + * flushers. + */ + if (space_info->reclaim_size) + return 0; + if (!btrfs_calc_reclaim_metadata_size(fs_info, space_info)) return 0;