All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH v3 5/7] btrfs: remove global rsv stealing logic for orphan cleanup
Date: Tue,  9 Nov 2021 10:12:05 -0500	[thread overview]
Message-ID: <aaf3c230a541b9f0e238c5bd84452faa08c0ab04.1636470628.git.josef@toxicpanda.com> (raw)
In-Reply-To: <cover.1636470628.git.josef@toxicpanda.com>

This is very old code before we were stealing from the global reserve
during evict.  We have proper ways to steal from the global reserve
while we're evicting, so rip out this code as it's no longer necessary.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/space-info.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index f72d70051f5b..6b65baec33d4 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -1601,16 +1601,9 @@ int btrfs_reserve_metadata_bytes(struct btrfs_root *root,
 				 enum btrfs_reserve_flush_enum flush)
 {
 	struct btrfs_fs_info *fs_info = root->fs_info;
-	struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv;
 	int ret;
 
 	ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush);
-	if (ret == -ENOSPC &&
-	    unlikely(root->orphan_cleanup_state == ORPHAN_CLEANUP_STARTED)) {
-		if (block_rsv != global_rsv &&
-		    !btrfs_block_rsv_use_bytes(global_rsv, orig_bytes))
-			ret = 0;
-	}
 	if (ret == -ENOSPC) {
 		trace_btrfs_space_reservation(fs_info, "space_info:enospc",
 					      block_rsv->space_info->flags,
-- 
2.26.3


  parent reply	other threads:[~2021-11-09 15:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 15:12 [PATCH v3 0/7] Use global rsv stealing for evict and clean things up Josef Bacik
2021-11-09 15:12 ` [PATCH v3 1/7] btrfs: handle priority ticket failures in their respective helpers Josef Bacik
2021-11-11 13:10   ` Nikolay Borisov
2021-11-09 15:12 ` [PATCH v3 2/7] btrfs: check for priority ticket granting before flushing Josef Bacik
2021-11-11 13:14   ` Nikolay Borisov
2021-11-11 14:13     ` Josef Bacik
2021-11-11 14:50       ` Nikolay Borisov
2021-11-11 15:17         ` David Sterba
2021-11-17 17:04   ` Nikolay Borisov
2021-11-18  8:54     ` David Sterba
2021-11-09 15:12 ` [PATCH v3 3/7] btrfs: check ticket->steal in steal_from_global_block_rsv Josef Bacik
2021-11-11 13:28   ` Nikolay Borisov
2021-11-09 15:12 ` [PATCH v3 4/7] btrfs: make BTRFS_RESERVE_FLUSH_EVICT use the global rsv stealing code Josef Bacik
2021-11-11 14:46   ` Nikolay Borisov
2021-11-09 15:12 ` Josef Bacik [this message]
2021-11-09 15:12 ` [PATCH v3 6/7] btrfs: get rid of root->orphan_cleanup_state Josef Bacik
2021-11-09 15:12 ` [PATCH v3 7/7] btrfs: change root to fs_info for btrfs_reserve_metadata_bytes Josef Bacik
2021-11-16 16:38 ` [PATCH v3 0/7] Use global rsv stealing for evict and clean things up 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=aaf3c230a541b9f0e238c5bd84452faa08c0ab04.1636470628.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=kernel-team@fb.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 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.