]> git.baikalelectronics.ru Git - kernel.git/commit
dm switch: efficiently support repetitive patterns
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 28 Jul 2014 22:11:25 +0000 (18:11 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 1 Aug 2014 16:30:37 +0000 (12:30 -0400)
commit29f7eeeed3d1b7a4a5aee8cadeead9e212566fff
tree79baf7a2894d3390e3c59c164382a481984a2a0c
parent73bddfb9e06afd28044d1e920a4efb391a66d8ef
dm switch: efficiently support repetitive patterns

Add support for quickly loading a repetitive pattern into the
dm-switch target.

In the "set_regions_mappings" message, the user may now use "Rn,m" as
one of the arguments.  "n" and "m" are hexadecimal numbers.  The "Rn,m"
argument repeats the last "n" arguments in the following "m" slots.

For example:
dmsetup message switch 0 set_region_mappings 1000:1 :2 R2,10
is equivalent to
dmsetup message switch 0 set_region_mappings 1000:1 :2 :1 :2 :1 :2 :1 :2 \
:1 :2 :1 :2 :1 :2 :1 :2 :1 :2

Requested-by: Jay Wang <jwang@nimblestorage.com>
Tested-by: Jay Wang <jwang@nimblestorage.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Documentation/device-mapper/switch.txt
drivers/md/dm-switch.c