linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: [PATCH v2 09/10] btrfs-progs: Use btrfs_device->fs_info to replace btrfs_device->dev_root
Date: Fri,  9 Feb 2018 15:44:27 +0800	[thread overview]
Message-ID: <20180209074428.29187-11-wqu@suse.com> (raw)
In-Reply-To: <20180209074428.29187-1-wqu@suse.com>

Same as kernel declaration.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 utils.c   | 2 +-
 volumes.c | 6 +++---
 volumes.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/utils.c b/utils.c
index e9cb3a82fda6..eff5fb64cfd5 100644
--- a/utils.c
+++ b/utils.c
@@ -216,7 +216,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
 	device->total_bytes = device_total_bytes;
 	device->bytes_used = 0;
 	device->total_ios = 0;
-	device->dev_root = fs_info->dev_root;
+	device->fs_info = fs_info;
 	device->name = strdup(path);
 	if (!device->name) {
 		ret = -ENOMEM;
diff --git a/volumes.c b/volumes.c
index c2efb3c674dc..cff54c612872 100644
--- a/volumes.c
+++ b/volumes.c
@@ -380,7 +380,7 @@ static int find_free_dev_extent_start(struct btrfs_device *device,
 				      u64 *start, u64 *len)
 {
 	struct btrfs_key key;
-	struct btrfs_root *root = device->dev_root;
+	struct btrfs_root *root = device->fs_info->dev_root;
 	struct btrfs_dev_extent *dev_extent;
 	struct btrfs_path *path;
 	u64 hole_size;
@@ -724,7 +724,7 @@ int btrfs_update_device(struct btrfs_trans_handle *trans,
 	struct extent_buffer *leaf;
 	struct btrfs_key key;
 
-	root = device->dev_root->fs_info->chunk_root;
+	root = device->fs_info->chunk_root;
 
 	path = btrfs_alloc_path();
 	if (!path)
@@ -1895,7 +1895,7 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
 	}
 
 	fill_device_from_item(leaf, dev_item, device);
-	device->dev_root = fs_info->dev_root;
+	device->fs_info = fs_info;
 	return ret;
 }
 
diff --git a/volumes.h b/volumes.h
index 950de5a9f910..84deafc98b0d 100644
--- a/volumes.h
+++ b/volumes.h
@@ -26,7 +26,7 @@
 
 struct btrfs_device {
 	struct list_head dev_list;
-	struct btrfs_root *dev_root;
+	struct btrfs_fs_info *fs_info;
 	struct btrfs_fs_devices *fs_devices;
 
 	u64 total_ios;
-- 
2.16.1


  parent reply	other threads:[~2018-02-09  7:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09  7:44 [PATCH v2 00/10] Chunk allocator unification Qu Wenruo
2018-02-09  7:44 ` [PATCH v2] btrfs-progs: ctree: Add extra level check for read_node_slot() Qu Wenruo
2018-02-09  8:09   ` Nikolay Borisov
2018-02-09 10:02     ` Qu Wenruo
2018-02-09  7:44 ` [PATCH v2 01/10] btrfs-progs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info Qu Wenruo
2018-02-09  7:44 ` [PATCH v2 02/10] btrfs-progs: Merge btrfs_alloc_data_chunk into btrfs_alloc_chunk Qu Wenruo
2018-02-09  7:44 ` [PATCH v2 03/10] btrfs-progs: Make btrfs_alloc_chunk to handle block group creation Qu Wenruo
2018-02-09  7:44 ` [PATCH v2 04/10] btrfs-progs: Introduce btrfs_raid_array and related infrastructures Qu Wenruo
2018-02-09  7:44 ` [PATCH v2 05/10] btrfs-progs: volumes: Allow find_free_dev_extent() to return maximum hole size Qu Wenruo
2018-02-09  7:44 ` [PATCH v2 06/10] btrfs-progs: kernel-lib: Port kernel sort() to btrfs-progs Qu Wenruo
2018-02-21 15:40   ` David Sterba
2018-02-22  1:43     ` Qu Wenruo
2018-03-09 18:14       ` David Sterba
2018-02-09  7:44 ` [PATCH v2 07/10] btrfs-progs: volumes: Unify free dev extent search behavior between kernel and btrfs-progs Qu Wenruo
2018-02-09  7:44 ` [PATCH v2 08/10] btrfs-progs: Move chunk stripe size calcution function to volumes.h Qu Wenruo
2018-02-09  7:44 ` Qu Wenruo [this message]
2018-02-09  7:44 ` [PATCH v2 10/10] btrfs-progs: Refactor btrfs_alloc_chunk to mimic kernel structure and behavior Qu Wenruo
2018-02-09  8:17   ` Nikolay Borisov
2018-02-09 10:01     ` 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=20180209074428.29187-11-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=dsterba@suse.cz \
    --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;
as well as URLs for NNTP newsgroup(s).