aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/device-mapper
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2014-07-28 18:11:25 -0400
committerMike Snitzer <snitzer@redhat.com>2014-08-01 12:30:37 -0400
commit56b1ebf2d9798257c5932c8a0dd9da16796dbf36 (patch)
tree79baf7a2894d3390e3c59c164382a481984a2a0c /Documentation/device-mapper
parent99eb1908e643609e83454c6fbcbb59f9055abf09 (diff)
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>
Diffstat (limited to 'Documentation/device-mapper')
-rw-r--r--Documentation/device-mapper/switch.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/device-mapper/switch.txt b/Documentation/device-mapper/switch.txt
index 2fa749387be8..8897d0494838 100644
--- a/Documentation/device-mapper/switch.txt
+++ b/Documentation/device-mapper/switch.txt
@@ -106,6 +106,11 @@ which paths.
106 The path number in the range 0 ... (<num_paths> - 1). 106 The path number in the range 0 ... (<num_paths> - 1).
107 Expressed in hexadecimal (WITHOUT any prefix like 0x). 107 Expressed in hexadecimal (WITHOUT any prefix like 0x).
108 108
109R<n>,<m>
110 This parameter allows repetitive patterns to be loaded quickly. <n> and <m>
111 are hexadecimal numbers. The last <n> mappings are repeated in the next <m>
112 slots.
113
109Status 114Status
110====== 115======
111 116
@@ -124,3 +129,10 @@ Create a switch device with 64kB region size:
124Set mappings for the first 7 entries to point to devices switch0, switch1, 129Set mappings for the first 7 entries to point to devices switch0, switch1,
125switch2, switch0, switch1, switch2, switch1: 130switch2, switch0, switch1, switch2, switch1:
126 dmsetup message switch 0 set_region_mappings 0:0 :1 :2 :0 :1 :2 :1 131 dmsetup message switch 0 set_region_mappings 0:0 :1 :2 :0 :1 :2 :1
132
133Set repetitive mapping. This command:
134 dmsetup message switch 0 set_region_mappings 1000:1 :2 R2,10
135is equivalent to:
136 dmsetup message switch 0 set_region_mappings 1000:1 :2 :1 :2 :1 :2 :1 :2 \
137 :1 :2 :1 :2 :1 :2 :1 :2 :1 :2
138