From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: [PATCH v3 0/9] Chunk allocator unification
Date: Thu, 22 Feb 2018 14:47:24 +0800 [thread overview]
Message-ID: <20180222064733.12126-1-wqu@suse.com> (raw)
This patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/libbtrfs_prepare
This patchset unified a large part of chunk allocator (free device
extent search) between kernel and btrfs-progs.
And reuses kernel function structures like btrfs_finish_chunk_alloc()
and btrfs_alloc_dev_extent().
Before the unification:
Kernel | Btrfs-progs
btrfs_alloc_chunk() | btrfs_alloc_chunk()
|- __btrfs_alloc_chunk() | |- Do all the work
|
btrfs_create_pending_block_groups() |
|- btrfs_insert_item() |
|- btrfs_finish_chunk_alloc() |
|- btrfs_alloc_dev_extent() |
After the unification:
Kernel | Btrfs-progs
btrfs_alloc_chunk() | btrfs_alloc_chunk()
|- __btrfs_alloc_chunk() | |- __btrfs_alloc_chunk()
| |- btrfs_finish_chunk_alloc()
btrfs_create_pending_block_groups() | |- btrfs_alloc_dev_extent()
|- btrfs_insert_item() |
|- btrfs_finish_chunk_alloc() |
And the similiar functions are share the same code base, with minor
member/functions change.
Changelog:
v2:
Make error handler in patch 7 better.
New patches to unify more functions used in btrfs_alloc_chunk()
v3:
Use standard library function qsort() to replace the kernel sort(),
suggested by David.
Qu Wenruo (9):
btrfs-progs: Refactor parameter of BTRFS_MAX_DEVS() from root to
fs_info
btrfs-progs: Merge btrfs_alloc_data_chunk into btrfs_alloc_chunk
btrfs-progs: Make btrfs_alloc_chunk to handle block group creation
btrfs-progs: Introduce btrfs_raid_array and related infrastructures
btrfs-progs: volumes: Allow find_free_dev_extent() to return maximum
hole size
btrfs-progs: volumes: Unify free dev extent search behavior between
kernel and btrfs-progs.
btrfs-progs: Move chunk stripe size calcution function to volumes.h
btrfs-progs: Use btrfs_device->fs_info to replace
btrfs_device->dev_root
btrfs-progs: Refactor btrfs_alloc_chunk to mimic kernel structure and
behavior
check/main.c | 22 --
convert/main.c | 10 +-
ctree.h | 12 +-
extent-tree.c | 12 +-
kerncompat.h | 5 +
mkfs/main.c | 27 +-
utils.c | 2 +-
volumes.c | 926 ++++++++++++++++++++++++++++++---------------------------
volumes.h | 66 +++-
9 files changed, 572 insertions(+), 510 deletions(-)
--
2.16.2
next reply other threads:[~2018-02-22 6:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 6:47 Qu Wenruo [this message]
2018-02-22 6:47 ` [PATCH v3 1/9] btrfs-progs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 2/9] btrfs-progs: Merge btrfs_alloc_data_chunk into btrfs_alloc_chunk Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 3/9] btrfs-progs: Make btrfs_alloc_chunk to handle block group creation Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 4/9] btrfs-progs: Introduce btrfs_raid_array and related infrastructures Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 5/9] btrfs-progs: volumes: Allow find_free_dev_extent() to return maximum hole size Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 6/9] btrfs-progs: volumes: Unify free dev extent search behavior between kernel and btrfs-progs Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 7/9] btrfs-progs: Move chunk stripe size calcution function to volumes.h Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 8/9] btrfs-progs: Use btrfs_device->fs_info to replace btrfs_device->dev_root Qu Wenruo
2018-02-22 6:47 ` [PATCH v3 9/9] btrfs-progs: Refactor btrfs_alloc_chunk to mimic kernel structure and behavior 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=20180222064733.12126-1-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).