Skip to content

dm-raid456 support using md/raid5.c, now with dirty-log

NeilBrown dm-devel linux-raid 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24md: reduce dependence on sysfs.drivers/md/md.c drivers/md/md.h drivers/md/raid5.c+62 -590 replies
2/24md/raid5: factor out code for changing size of stripe cache.drivers/md/raid5.c+25 -130 replies
3/24md/raid5: ensure we create a unique name for kmem_cache when mddev has no gendiskdrivers/md/raid5.c drivers/md/raid5.h+9 -50 replies
4/24md: be more careful setting MD_CHANGE_CLEANdrivers/md/bitmap.c drivers/md/md.c+4 -20 replies
5/24md: split out md_rdev_initdrivers/md/md.c drivers/md/md.h+20 -150 replies
6/24md: export various start/stop interfacesdrivers/md/md.c drivers/md/md.h+13 -60 replies
7/24md/dm: create dm-raid456 module using md/raid5drivers/md/Kconfig drivers/md/Makefile drivers/md/dm-raid456.c+446 -00 replies
8/24dm-raid456: add support for raising events to userspace.drivers/md/dm-raid456.c drivers/md/md.c drivers/md/md.h+11 -00 replies
9/24raid5: Don't set read-ahead when there is no queuedrivers/md/raid5.c+17 -150 replies
10/24dm-raid456: add congestion checking.drivers/md/dm-raid456.c drivers/md/dm-table.c drivers/md/raid5.c +2 more+56 -70 replies
11/24md/raid5: add simple plugging infrastructure.drivers/md/md.c drivers/md/md.h drivers/md/raid5.c +1 more+93 -140 replies
12/24md/plug: optionally use plugger to unplug an array during resync/recovery.drivers/md/md.c drivers/md/md.h drivers/md/raid5.c+15 -30 replies
13/24dm-raid456: support unplugdrivers/md/dm-raid456.c drivers/md/dm-table.c drivers/md/raid5.c +2 more+20 -60 replies
14/24dm-raid456: add support for setting IO hints.drivers/md/dm-raid456.c drivers/md/raid5.c+43 -90 replies
15/24dm-raid456: add suspend/resume methoddrivers/md/dm-raid456.c drivers/md/md.c drivers/md/md.h+29 -20 replies
16/24dm-raid456: add message handler.drivers/md/dm-raid456.c drivers/md/raid5.c drivers/md/raid5.h+29 -10 replies
17/24md/bitmap: white space clean up and similar.drivers/md/bitmap.c+135 -1660 replies
18/24md/bitmap: reduce dependence on sysfs.drivers/md/bitmap.c+4 -30 replies
19/24md/bitmap: clean up plugging calls.drivers/md/bitmap.c drivers/md/md.c drivers/md/md.h+3 -30 replies
20/24md/bitmap: optimise scanning of empty bitmaps.drivers/md/bitmap.c+13 -100 replies
21/24dm-dirty-log: allow log size to be different from target size.drivers/md/dm-log-userspace-base.c drivers/md/dm-log.c drivers/md/dm-raid1.c +1 more+22 -143 replies
22/24md/bitmap: prepare for storing write-intent-bitmap via dm-dirty-log.drivers/md/bitmap.c drivers/md/bitmap.h drivers/md/md.h+99 -390 replies
23/24md/bitmap: separate out loading a bitmap from initialising the structures.drivers/md/bitmap.c drivers/md/bitmap.h drivers/md/md.c+60 -230 replies
24/24dm-raid456: switch to use dm_dirty_log for tracking dirty regions.drivers/md/dm-raid456.c drivers/md/md.h+38 -100 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/24] dm-raid456 support using md/raid5.c, now with dirty-log

Nearly two months ago I posted my first serious attempt and making md/raid5.c work as a dm target. I met with cautious approval I think, but as it didn't interact with dirty-logs yet it wasn't really read for prime time.

It has taken longer than I hoped, but here is version 2, now with dirty-log integration.
I have done a modest amount of testing, watching the bits in the log getting cleared and set just as you would expect, and watching the resync complete instantly when the dirty-log shows that all regions are clean.

There is not even a hint of cluster support yet, but that shouldn't be necessary for initial submission to mainline.

A significant difference to Heinz' dm-raid45 is that I only honour the table options that lvm actually sets. The extra ones don't really fit with md/raid5 and I don't think they need to be table options. If any are needed they might work OK as messages (???).

There are a number of changes to core-dm in here including:
- support for targets to be unplugged when the device is
- support for targets to report congestion beyond the congestion of component devices
- support for the dirty-log to cover and extent different from the size of the target (For raid5 it must be the size of the components).
I have tried to fit these to the general style of dm as best as I can.

There is certainly room for more testing and review, but I would like to see this entering -next soon with a view to seeing it merged in the next merge window.

Is this reasonable? Achievable?

Comments?

These patches can all be found on the "md-dm-raid45" branch of
git://neil.brown.name/md/
or at http://neil.brown.name/git?p=md;a=shortlog;h=refs/heads/md-dm-raid45

Thanks,
NeilBrown

---

NeilBrown (24):
md: reduce dependence on sysfs.
md/raid5: factor out code for changing size of stripe cache. md/raid5: ensure we create a unique name for kmem_cache when mddev has no gendisk
md: be more careful setting MD_CHANGE_CLEAN
md: split out md_rdev_init
md: export various start/stop interfaces
md/dm: create dm-raid456 module using md/raid5
dm-raid456: add support for raising events to userspace.
raid5: Don't set read-ahead when there is no queue
dm-raid456: add congestion checking.
md/raid5: add simple plugging infrastructure.
md/plug: optionally use plugger to unplug an array during resync/recovery.
dm-raid456: support unplug
dm-raid456: add support for setting IO hints.
dm-raid456: add suspend/resume method
dm-raid456: add message handler.
md/bitmap: white space clean up and similar.
md/bitmap: reduce dependence on sysfs.
md/bitmap: clean up plugging calls.
md/bitmap: optimise scanning of empty bitmaps.
dm-dirty-log: allow log size to be different from target size. md/bitmap: prepare for storing write-intent-bitmap via dm-dirty-log. md/bitmap: separate out loading a bitmap from initialising the structures.
dm-raid456: switch to use dm_dirty_log for tracking dirty regions.

 drivers/md/Kconfig                 |    8 +
 drivers/md/Makefile                |    1 
 drivers/md/bitmap.c                |  508 +++++++++++++++++---------------
 drivers/md/bitmap.h                |    6 
 drivers/md/dm-log-userspace-base.c |   11 -
 drivers/md/dm-log.c                |   18 +
 drivers/md/dm-raid1.c              |    4 
 drivers/md/dm-raid456.c            |  576 ++++++++++++++++++++++++++++++++++++
 drivers/md/dm-table.c              |   19 +
 drivers/md/md.c                    |  234 +++++++++------
 drivers/md/md.h                    |   51 +++
 drivers/md/raid5.c                 |  169 ++++++-----
 drivers/md/raid5.h                 |    8 -
 include/linux/device-mapper.h      |   13 +
 include/linux/dm-dirty-log.h       |    3 
 15 files changed, 1235 insertions(+), 394 deletions(-)
 create mode 100644 drivers/md/dm-raid456.c