Skip to content

Minor Raid5 Fixes and Cleanup

Logan Gunthorpe linux-raid lkml 1 version Applied

Status from this message: Applied to md-next. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/7md/raid5: Cleanup setup_conf() error returnsdrivers/md/raid5.c+11 -71 reply
2/7md/raid5: Un-nest struct raid5_percpu definitiondrivers/md/raid5.h+11 -91 reply
3/7md/raid5: Add __rcu annotation to struct disk_infodrivers/md/raid5.c drivers/md/raid5.h+28 -211 reply
4/7md/raid5: Annotate rdev/replacement accesses when nr_pending is elevateddrivers/md/raid5.c+19 -91 reply
5/7md/raid5: Annotate rdev/replacement access when mddev_lock is helddrivers/md/raid5.c+43 -221 reply
6/7md/raid5-ppl: Annotate with rcu_dereference_protected()drivers/md/raid5-ppl.c+10 -31 reply
7/7md/raid5: Annotate functions that hold device_lock with __must_holddrivers/md/raid5.c+17 -51 reply

Reviews trailers per patch

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

PatchChristoph Hellwig
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-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 v1 0/7] Minor Raid5 Fixes and Cleanup

Hi,

This series contains a few cleanup and minor fixes to the raid5 code to make it a bit easier to hack on.

Patch 1 cleans up the error returns in setup_conf() (I had an abandonded patch that added another error out and needed this clean more sensible).

Patch 2 fixes a sparse warning with the raid5_percpu structure.

Patch 3 through 6 fixes sparse warnings related to missing __rcu annotations when using the RCU calls.

Patch 7 just adds some basic __must_hold annotations for the device_lock to any function that is called while holding the lock. Sparse doesn't really check this, but the annotation makes the locks a little easier to analyze.

Thanks,

Logan

--

Logan Gunthorpe (7):
md/raid5: Cleanup setup_conf() error returns
md/raid5: Un-nest struct raid5_percpu definition md/raid5: Add __rcu annotation to struct disk_info md/raid5: Annotate rdev/replacement accesses when nr_pending is
elevated
md/raid5: Annotate rdev/replacement access when mddev_lock is held md/raid5-ppl: Annotate with rcu_dereference_protected() md/raid5: Annotate functions that hold device_lock with __must_hold

 drivers/md/raid5-ppl.c |  13 ++-
 drivers/md/raid5.c     | 179 ++++++++++++++++++++++++++---------------
 drivers/md/raid5.h     |  23 +++---
 3 files changed, 139 insertions(+), 76 deletions(-)

base-commit: 3123109284176b1532874591f7c81f3837bbdc17 --
2.30.2