Skip to content

md: Remove the hash tables from raid0.

Andre Noll linux-raid 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6md: raid0: Replace hash table lookup by looping over all strip_zones.+0 -00 replies
2/6md: raid0: Remove hash table.+0 -00 replies
3/6md: raid0: Remove hash spacing and sector shift.+0 -00 replies
4/6md: raid0: Make raid0_run() return a proper error code.+0 -00 replies
5/6md: raid0: Kfree() strip_zone and devlist in create_strip_zones().+0 -00 replies
6/6md: raid0: Simplify raid0_run().+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] md: Remove the hash tables from raid0.

As mentioned by Neil, the raid0 hash table code does probably not add any value. Moreover, it contains some rather strange sector_t manipulations which are needed to setup and maintain the table.

This patch series against Neil's for-next tree as of yesterday removes the hash table from the raid0 code.

Patch #1 replaces the hash table lookup by a simple function that loops over all strip zones to find the zone that holds a given sector. This change allows to get rid of the hash table itself (patch #2) and of related fields of struct raid0_private_data (patch #3).

Patch #4 makes raid0 return a proper error code rather than -ENOMEM in case the array could not be started for reasons other than memory shortage.

The remaining two patches are simple cleanups that further simplify the raid0 code a bit.

The patched kernel has been tested with a smallish raid0 array consisting of five devices of varying sizes (created and filled with contents by an unpatched kernel) and seems to work just fine. It passes the raid0 tests of the mdadm test suite.

Please consider for inclusion.

 drivers/md/raid0.c |  150 ++++++++++++++--------------------------------------
 drivers/md/raid0.h |    4 --
 2 files changed, 39 insertions(+), 115 deletions(-)

Thanks
Andre