From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH 3/3] btrfs: global reserve fallback should use metadata_size
Date: Fri, 16 Aug 2019 11:06:00 -0400 [thread overview]
Message-ID: <20190816150600.9188-4-josef@toxicpanda.com> (raw)
In-Reply-To: <20190816150600.9188-1-josef@toxicpanda.com>
We only use the global reserve fallback for truncates, so use
calc_metadata_size instead of calc_insert_metadata_size.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
fs/btrfs/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index f21416d68c2c..cc1a3000a344 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -636,7 +636,7 @@ struct btrfs_trans_handle *btrfs_start_transaction_fallback_global_rsv(
if (IS_ERR(trans))
return trans;
- num_bytes = btrfs_calc_insert_metadata_size(fs_info, num_items);
+ num_bytes = btrfs_calc_metadata_size(fs_info, num_items);
ret = btrfs_cond_migrate_bytes(fs_info, &fs_info->trans_block_rsv,
num_bytes, min_factor);
if (ret) {
--
2.21.0
next prev parent reply other threads:[~2019-08-16 15:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 15:05 [PATCH 0/3] Rework the worst case calculations for space reservation Josef Bacik
2019-08-16 15:05 ` [PATCH 1/3] btrfs: rename the btrfs_calc_*_metadata_size helpers Josef Bacik
2019-08-19 8:30 ` Nikolay Borisov
2019-08-19 12:47 ` Josef Bacik
2019-08-20 17:40 ` David Sterba
2019-08-16 15:05 ` [PATCH 2/3] btrfs: only reserve metadata_size for inodes Josef Bacik
2019-08-19 9:17 ` Nikolay Borisov
2019-08-19 12:49 ` Josef Bacik
2019-08-16 15:06 ` Josef Bacik [this message]
2019-08-16 15:35 ` [PATCH 3/3] btrfs: global reserve fallback should use metadata_size Filipe Manana
2019-08-16 16:51 ` Josef Bacik
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=20190816150600.9188-4-josef@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/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