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 33/34] btrfs: Remove fs_info from btrfs_force_chunk_alloc
Date: Wed, 20 Jun 2018 15:49:15 +0300	[thread overview]
Message-ID: <1529498956-4241-34-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1529498956-4241-1-git-send-email-nborisov@suse.com>

It can be referenced from the passed transaction handle.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/ctree.h       | 3 +--
 fs/btrfs/extent-tree.c | 5 ++---
 fs/btrfs/relocation.c  | 3 +--
 fs/btrfs/volumes.c     | 2 +-
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index caeca7592013..2062b393e3fd 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2809,8 +2809,7 @@ int btrfs_error_unpin_extent_range(struct btrfs_fs_info *fs_info,
 				   u64 start, u64 end);
 int btrfs_discard_extent(struct btrfs_fs_info *fs_info, u64 bytenr,
 			 u64 num_bytes, u64 *actual_bytes);
-int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans,
-			    struct btrfs_fs_info *fs_info, u64 type);
+int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, u64 type);
 int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range);
 
 int btrfs_init_space_info(struct btrfs_fs_info *fs_info);
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index d6f82a5c79d3..c3c3e6f3b72c 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -9463,10 +9463,9 @@ int btrfs_inc_block_group_ro(struct btrfs_block_group_cache *cache)
 	return ret;
 }
 
-int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans,
-			    struct btrfs_fs_info *fs_info, u64 type)
+int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, u64 type)
 {
-	u64 alloc_flags = get_alloc_profile(fs_info, type);
+	u64 alloc_flags = get_alloc_profile(trans->fs_info, type);
 
 	return do_chunk_alloc(trans, alloc_flags, CHUNK_ALLOC_FORCE);
 }
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index ef1b5aad035e..22214033a4a2 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -4169,8 +4169,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
 		}
 	}
 	if (trans && progress && err == -ENOSPC) {
-		ret = btrfs_force_chunk_alloc(trans, fs_info,
-					      rc->block_group->flags);
+		ret = btrfs_force_chunk_alloc(trans, rc->block_group->flags);
 		if (ret == 1) {
 			err = 0;
 			progress = 0;
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 36225e5b16e5..5bd6f3a40f9c 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3057,7 +3057,7 @@ static int btrfs_may_alloc_data_chunk(struct btrfs_fs_info *fs_info,
 			if (IS_ERR(trans))
 				return PTR_ERR(trans);
 
-			ret = btrfs_force_chunk_alloc(trans, fs_info,
+			ret = btrfs_force_chunk_alloc(trans,
 						      BTRFS_BLOCK_GROUP_DATA);
 			btrfs_end_transaction(trans);
 			if (ret < 0)
-- 
2.7.4


  parent reply	other threads:[~2018-06-20 12:49 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 12:48 [PATCH 00/34] fs_info cleanup of extent-tree.c Nikolay Borisov
2018-06-20 12:48 ` [PATCH 01/34] btrfs: Remove fs_info from insert_tree_block_ref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 02/34] btrfs: Remove fs_info from insert_extent_data_ref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 03/34] btrfs: Remove fs_info argument from insert_extent_backref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 04/34] btrfs: Remove fs_info from remove_extent_data_ref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 05/34] btrfs: Remove fs_info from fixup_low_keys Nikolay Borisov
2018-06-20 12:48 ` [PATCH 06/34] btrfs: Remove fs_info from lookup_inline_extent_backref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 07/34] btrfs: Remove fs_info argument from update_inline_extent_backref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 08/34] btrfs: Remove fs_info argument from lookup_tree_block_ref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 09/34] btrfs: Remove fs_info argument from lookup_extent_data_ref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 10/34] btrfs: Remove fs_info from lookup_extent_backref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 11/34] btrfs: Remove fs_info from btrfs_add_delayed_tree_ref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 12/34] btrfs: Remove fs_info from btrfs_add_delayed_data_ref Nikolay Borisov
2018-06-20 12:48 ` [PATCH 13/34] btrfs: Remove fs_info from btrfs_make_block_group Nikolay Borisov
2018-06-20 12:48 ` [PATCH 14/34] btrfs: Remove fs_info from btrfs_remove_block_group Nikolay Borisov
2018-06-20 12:48 ` [PATCH 15/34] btrfs: Remove fs_info from __btrfs_free_extent Nikolay Borisov
2018-06-20 12:48 ` [PATCH 16/34] btrfs: Remove fs_info from alloc_reserved_file_extent Nikolay Borisov
2018-06-20 12:48 ` [PATCH 17/34] btrfs: Remove fs_info argument from __btrfs_inc_extent_ref Nikolay Borisov
2018-06-20 12:49 ` [PATCH 18/34] btrfs: Remove fs_info from run_delayed_data_ref Nikolay Borisov
2018-06-20 12:49 ` [PATCH 19/34] btrfs: Remove fs_info from run_delayed_extent_op Nikolay Borisov
2018-06-20 12:49 ` [PATCH 20/34] btrfs: Remove unused fs_info from cleanup_extent_op Nikolay Borisov
2018-06-20 12:49 ` [PATCH 21/34] btrfs: Remove fs_info from cleanup_ref_head Nikolay Borisov
2018-06-20 12:49 ` [PATCH 22/34] btrfs: Remove fs_info from run_delayed_tree_ref Nikolay Borisov
2018-06-20 12:49 ` [PATCH 23/34] btrfs: Remove fs_info from do_chunk_alloc Nikolay Borisov
2018-06-20 12:49 ` [PATCH 24/34] btrfs: Remove fs_info from btrfs_alloc_chunk Nikolay Borisov
2018-06-20 12:49 ` [PATCH 25/34] btrfs: Remove fs_info from check_system_chunk Nikolay Borisov
2018-06-20 12:49 ` [PATCH 26/34] btrfs: Remove fs_info from free_excluded_extents Nikolay Borisov
2018-06-20 12:49 ` [PATCH 27/34] btrfs: Remove fs_info from exclude_super_stripes Nikolay Borisov
2018-06-20 12:49 ` [PATCH 28/34] btrfs: Remove fs_info from insert_inline_extent_backref Nikolay Borisov
2018-06-20 12:49 ` [PATCH 29/34] btrfs: Remove fs_info from run_one_delayed_ref Nikolay Borisov
2018-06-20 12:49 ` [PATCH 30/34] btrfs: Remove fs_info from remove_extent_backref Nikolay Borisov
2018-06-20 12:49 ` [PATCH 31/34] btrfs: Remove fs_info from btrfs_alloc_logged_file_extent Nikolay Borisov
2018-06-20 12:49 ` [PATCH 32/34] btrfs: Remove fs_info from btrfs_inc_block_group_ro Nikolay Borisov
2018-06-20 12:49 ` Nikolay Borisov [this message]
2018-06-20 12:49 ` [PATCH 34/34] btrfs: Remove fs_info from convert_extent_item_v0 Nikolay Borisov
2018-06-21  2:05   ` Qu Wenruo
2018-06-21  5:23     ` Nikolay Borisov
2018-06-21  2:08 ` [PATCH 00/34] fs_info cleanup of extent-tree.c Qu Wenruo
2018-06-21 13:31 ` David Sterba
2018-06-21 15:03 ` (about compiler optimization) " Qu Wenruo

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=1529498956-4241-34-git-send-email-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.