Skip to content

MD: a caching layer for raid5/6

Shaohua Li linux-raid 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest13 patches 30 repliesIn review
  2. v37 of 8 patches 4 repliesSuperseded
  3. v25 of 6 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches5 repliesSuperseded

Changes in v4 from the cover letter

-split patche into smaller ones
-add more comments into code and some code cleanup -bug fixes in recovery code
-fix the feature bit

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13MD: add a new disk role to present cache devicedrivers/md/md.c drivers/md/md.h include/uapi/linux/raid/md_p.h+29 -20 replies
2/13raid5: directly use mddev->queuedrivers/md/raid5.c+5 -70 replies
3/13raid5: cache log handlingdrivers/md/raid5-cache.c include/uapi/linux/raid/md_p.h+1393 -00 replies
4/13raid5: cache part of raid5 cachedrivers/md/Makefile drivers/md/raid5-cache.c drivers/md/raid5.c +1 more+896 -30 replies
5/13raid5: cache reclaim supportdrivers/md/raid5-cache.c drivers/md/raid5.c drivers/md/raid5.h+510 -80 replies
6/13raid5: cache IO error handlingdrivers/md/raid5-cache.c+111 -30 replies
7/13raid5: cache device quiesce supportdrivers/md/raid5-cache.c drivers/md/raid5.c drivers/md/raid5.h+38 -00 replies
8/13raid5: cache recovery supportdrivers/md/raid5-cache.c+639 -10 replies
9/13raid5: add some sysfs entriesdrivers/md/raid5-cache.c drivers/md/raid5.c drivers/md/raid5.h+302 -10 replies
10/13raid5: don't allow resize/reshape with cache supportdrivers/md/raid5.c+6 -00 replies
11/13raid5: guarantee cache release stripes in correct waydrivers/md/raid5-cache.c drivers/md/raid5.c drivers/md/raid5.h+80 -430 replies
12/13raid5: enable cache for raid array with cache diskdrivers/md/raid5.c+20 -00 replies
13/13raid5: skip resync if caching is enableddrivers/md/raid5.c+7 -00 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH V4 00/13] MD: a caching layer for raid5/6

Hi,

This is the V4 version of the raid5/6 caching layer patches. The patches add a caching layer for raid5/6. The caching layer uses a SSD as a cache for a raid 5/6. It works like the similar way of a hardware raid controller. The purpose is to improve raid performance (reduce read-modify-write) and fix write hole issue.

I split the patch to into smaller ones and hopefuly they are easier to understand. The splitted patches will not break bisect. Functions of main parts are divided well, though some data structures not.

I detached the multiple reclaim thread patch, the patch set is aimed to make basic logic ready, and we can improve performance later (as long as we can make sure current logic is flexible to have improvement space for performance).

Neil,

For the issue if flush_start block is required, I double checked it. You are right we don't really need it, the data/parity checksum stored in cache disk will guarantee data integrity, but we can't use a simple disk cache flush as there is ordering issue. So the flush_start block does increase overhead, but might not too much. I didn't delete it yet, but I'm open to do it.

Thanks,
Shaohua

V4:
-split patche into smaller ones
-add more comments into code and some code cleanup -bug fixes in recovery code
-fix the feature bit

V3:
-make reclaim multi-thread
-add statistics in sysfs
-bug fixes

V2:
-metadata write doesn't use FUA
-discard request is only issued when necessary
-bug fixes and cleanup

Shaohua Li (12):
raid5: directly use mddev->queue
raid5: cache log handling
raid5: cache part of raid5 cache
raid5: cache reclaim support
raid5: cache IO error handling
raid5: cache device quiesce support
raid5: cache recovery support
raid5: add some sysfs entries
raid5: don't allow resize/reshape with cache support
raid5: guarantee cache release stripes in correct way
raid5: enable cache for raid array with cache disk
raid5: skip resync if caching is enabled

Song Liu (1):
MD: add a new disk role to present cache device

 drivers/md/Makefile            |    2 +-
 drivers/md/md.c                |   24 +-
 drivers/md/md.h                |    4 +
 drivers/md/raid5-cache.c       | 3755 ++++++++++++++++++++++++++++++++++++++++
 drivers/md/raid5.c             |  176 +-
 drivers/md/raid5.h             |   24 +
 include/uapi/linux/raid/md_p.h |   79 +
 7 files changed, 4016 insertions(+), 48 deletions(-)
 create mode 100644 drivers/md/raid5-cache.c
Signature · 1 line
1.8.1