All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 1/6] btrfs: Free correct amount of space in btrfs_delayed_inode_reserve_metadata
Date: Mon, 22 Feb 2021 18:40:42 +0200	[thread overview]
Message-ID: <20210222164047.978768-2-nborisov@suse.com> (raw)
In-Reply-To: <20210222164047.978768-1-nborisov@suse.com>

Following commit f218ea6c4792 ("btrfs: delayed-inode: Remove wrong
qgroup meta reservation calls") this function now reserves num_bytes,
rather than the fixed amount of nodesize. As such this requires the
same amount to be freed in case of failure. Fix this by adjusting
the amount we are freeing.

Fixes f218ea6c4792 ("btrfs: delayed-inode: Remove wrong qgroup meta reservation calls")

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/delayed-inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index ec0b50b8c5d6..ac9966e76a2f 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -649,7 +649,7 @@ static int btrfs_delayed_inode_reserve_metadata(
 						      btrfs_ino(inode),
 						      num_bytes, 1);
 		} else {
-			btrfs_qgroup_free_meta_prealloc(root, fs_info->nodesize);
+			btrfs_qgroup_free_meta_prealloc(root, num_bytes);
 		}
 		return ret;
 	}
-- 
2.25.1


  reply	other threads:[~2021-02-22 16:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 16:40 [PATCH 0/6] Qgroup/delayed node related fixes Nikolay Borisov
2021-02-22 16:40 ` Nikolay Borisov [this message]
2021-02-22 23:41   ` [PATCH 1/6] btrfs: Free correct amount of space in btrfs_delayed_inode_reserve_metadata Qu Wenruo
2021-02-22 16:40 ` [PATCH 2/6] btrfs: Export qgroup_reserve_meta Nikolay Borisov
2021-02-22 23:42   ` Qu Wenruo
2021-02-25 16:27     ` David Sterba
2021-02-22 16:40 ` [PATCH 3/6] btrfs: Don't flush from btrfs_delayed_inode_reserve_metadata Nikolay Borisov
2021-02-22 23:45   ` Qu Wenruo
2021-02-22 16:40 ` [PATCH 4/6] btrfs: Cleanup try_flush_qgroup Nikolay Borisov
2021-02-22 23:46   ` Qu Wenruo
2021-02-22 16:40 ` [PATCH 5/6] btrfs: Remove btrfs_inode from btrfs_delayed_inode_reserve_metadata Nikolay Borisov
2021-02-22 23:53   ` Qu Wenruo
2021-02-22 16:40 ` [PATCH 6/6] btrfs: Simplify code flow in btrfs_delayed_inode_reserve_metadata Nikolay Borisov
2021-03-01 16:15   ` David Sterba
2021-03-01 16:20     ` Nikolay Borisov
2021-03-01 18:54       ` David Sterba
2021-03-01 18:55 ` [PATCH 0/6] Qgroup/delayed node related fixes David Sterba

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=20210222164047.978768-2-nborisov@suse.com \
    --to=nborisov@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.