From: David Sterba <dsterba@suse.cz>
To: Josef Bacik <josef@toxicpanda.com>
Cc: Nikolay Borisov <nborisov@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Optimise space flushing machinery
Date: Thu, 12 Mar 2020 21:36:24 +0100 [thread overview]
Message-ID: <20200312203624.GJ12659@twin.jikos.cz> (raw)
In-Reply-To: <b98c152e-f167-f4ee-dfa9-fc2185ab47b1@toxicpanda.com>
On Wed, Mar 11, 2020 at 01:59:14PM -0400, Josef Bacik wrote:
> >>> u64 to_reclaim = 0;
> >>>
> >>> - list_for_each_entry(ticket, &space_info->tickets, list)
> >>> - to_reclaim += ticket->bytes;
> >>> - list_for_each_entry(ticket, &space_info->priority_tickets, list)
> >>> - to_reclaim += ticket->bytes;
> >>> + lockdep_assert_held(&space_info->lock);
> >>> +
> >>> + if (space_info->reclaim_size)
> >>> + return space_info->reclaim_size;
> >>
> >> This undoes the fix that I put up making sure we include any space we
> >> can no longer overcommit. Thanks,
> >
> > Which fix is that?
>
> https://github.com/kdave/btrfs-devel/commit/593212a6137ff3c5674609b4233f8ecec459dc45
Nik sent me a fixup, now folded to the patch.
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index 9c36397b733c..0884dac883b5 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -792,13 +792,10 @@ btrfs_calc_reclaim_metadata_size(struct btrfs_fs_info *fs_info,
u64 used;
u64 avail;
u64 expected;
- u64 to_reclaim = 0;
+ u64 to_reclaim = space_info->reclaim_size;
lockdep_assert_held(&space_info->lock);
- if (space_info->reclaim_size)
- return space_info->reclaim_size;
-
avail = calc_available_free_space(fs_info, space_info,
BTRFS_RESERVE_FLUSH_
prev parent reply other threads:[~2020-03-12 20:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 9:00 [PATCH] btrfs: Optimise space flushing machinery Nikolay Borisov
2020-03-11 1:14 ` David Sterba
2020-03-11 17:52 ` Josef Bacik
2020-03-11 17:57 ` Nikolay Borisov
2020-03-11 17:59 ` Josef Bacik
2020-03-12 20:36 ` David Sterba [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200312203624.GJ12659@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox