From: Zhao Lei <zhaolei@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: Zhao Lei <zhaolei@cn.fujitsu.com>
Subject: [PATCH 0/3] btrfs: Move btrfs_raid_array to public
Date: Tue, 15 Sep 2015 21:08:05 +0800 [thread overview]
Message-ID: <cover.1442322310.git.zhaolei@cn.fujitsu.com> (raw)
This array is used to record attributes of each raid type,
make it public, and many functions will benifit with this array.
For example, num_tolerated_disk_barrier_failures(), we can
avoid complex conditions in this function, and get raid attribute
simply by accessing above array.
It can also make code logic simple, reduce duplication code, and
increase maintainability.
We can also add more raid attributes in this array, to make it
widely used.
Zhao Lei (3):
btrfs: Move btrfs_raid_array to public
btrfs: use btrfs_raid_array for
btrfs_get_num_tolerated_disk_barrier_failures()
btrfs: use btrfs_raid_array in btrfs_reduce_alloc_profile
fs/btrfs/disk-io.c | 35 ++++++++-----
fs/btrfs/extent-tree.c | 48 ++++++++----------
fs/btrfs/volumes.c | 135 ++++++++++++++++++++++++++++---------------------
fs/btrfs/volumes.h | 5 ++
4 files changed, 125 insertions(+), 98 deletions(-)
--
1.8.5.1
next reply other threads:[~2015-09-15 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 13:08 Zhao Lei [this message]
2015-09-15 13:08 ` [PATCH 1/3] btrfs: Move btrfs_raid_array to public Zhao Lei
2015-09-22 14:28 ` David Sterba
2015-09-15 13:08 ` [PATCH 2/3] btrfs: use btrfs_raid_array for btrfs_get_num_tolerated_disk_barrier_failures() Zhao Lei
2015-09-22 14:30 ` David Sterba
2015-09-15 13:08 ` [PATCH 3/3] btrfs: use btrfs_raid_array in btrfs_reduce_alloc_profile Zhao Lei
2015-09-22 14:33 ` 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=cover.1442322310.git.zhaolei@cn.fujitsu.com \
--to=zhaolei@cn.fujitsu.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 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).