Skip to content

Support setting the array size from userspace

Dan Williams linux-raid 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3md: add 'size' as a personality methoddrivers/md/faulty.c drivers/md/linear.c drivers/md/multipath.c +5 more+115 -222 replies
2/3md: centralize ->array_sectors modificationsdrivers/md/faulty.c drivers/md/linear.c drivers/md/md.c +6 more+18 -110 replies
3/3md: 'array_size' sysfs attributedrivers/md/md.c drivers/md/raid0.c drivers/md/raid1.c +4 more+109 -94 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchAndre Noll
1/3
2/3
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] Support setting the array size from userspace

This series, against the 'md/for-next' branch, adds a sysfs attribute for pinning the array size. As discussed earlier this is being initiated to support the extra size rounding expected for Intel(R) Matrix metadata arrays. For example a 20GB 4-disk raid5 array created in the orom will have the per-device size set to 13981448 sectors. MD calculates the array size as 41944320 sectors while the metadata records the size as 41943040 sectors.

Tested against a raid5 grow from 4 to 5 disks, and a grow that attempts to set the size smaller than the userspace pinned size. The attribute displays 'default' when the size is unpinned, to aid debug.

---

Dan Williams (3):
md: 'array_size' sysfs attribute
md: centralize ->array_sectors modifications
md: add 'size' as a personality method

 drivers/md/faulty.c       |   14 ++++++
 drivers/md/linear.c       |   15 ++++++-
 drivers/md/md.c           |   97 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/md/multipath.c    |   11 +++++
 drivers/md/raid0.c        |   22 ++++++++--
 drivers/md/raid1.c        |   19 +++++++--
 drivers/md/raid10.c       |   27 ++++++++++++-
 drivers/md/raid5.c        |   49 +++++++++++++++++------
 include/linux/raid/md.h   |    2 +
 include/linux/raid/md_k.h |    2 +
 10 files changed, 229 insertions(+), 29 deletions(-)