Skip to content

btrfs: Move btrfs_raid_array to public

Zhao Lei linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: Move btrfs_raid_array to publicfs/btrfs/volumes.c fs/btrfs/volumes.h+73 -591 reply
2/3btrfs: use btrfs_raid_array for btrfs_get_num_tolerated_disk_barrier_failures()fs/btrfs/disk-io.c fs/btrfs/volumes.c fs/btrfs/volumes.h+30 -131 reply
3/3btrfs: use btrfs_raid_array in btrfs_reduce_alloc_profilefs/btrfs/extent-tree.c+22 -261 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDavid Sterba
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs: Move btrfs_raid_array to public

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(-)
Signature · 1 line
1.8.5.1