linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: Move btrfs_raid_array to public
@ 2015-09-15 13:08 Zhao Lei
  2015-09-15 13:08 ` [PATCH 1/3] " Zhao Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Zhao Lei @ 2015-09-15 13:08 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Zhao Lei

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-22 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 13:08 [PATCH 0/3] btrfs: Move btrfs_raid_array to public Zhao Lei
2015-09-15 13:08 ` [PATCH 1/3] " 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

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).