dm-switch target
Subsystems (2)
Mikulas Patocka
maintainerPATCH 1/1 dm-switch target
Hi
This is the dm-switch target to be included in the next kernel.
It is equivalent to the last code sent by Jim Ramsay with the exception that REQ_FLUSH processing was removed (because hardware has no write-back cache).
Mikulas
---
dm-switch target
Originally developed by Jim Ramsay. Simplified by Mikulas Patocka.
--- drivers/md/Kconfig | 11 + drivers/md/Makefile | 1 drivers/md/dm-switch.c | 520 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 532 insertions(+)
drivers/md/Kconfig +11 -0
@@ -417,4 +417,15 @@ config DM_VERITY2 source "drivers/md/enhanceio/Kconfig" +config DM_SWITCH + tristate "Switch target support (EXPERIMENTAL)" + depends on BLK_DEV_DM && EXPERIMENTAL + ---help--- + Help text needs writing + + To compile this code as a module, choose M here: the module will + be called dm-switch. + + If unsure, say N. + endif # MD
drivers/md/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_DM_THIN_PROVISIONING) += dm obj-$(CONFIG_DM_VERITY) += dm-verity.o obj-$(CONFIG_DM_ZEROED) += dm-zeroed.o obj-$(CONFIG_DM_ENHANCEIO) += enhanceio/ +obj-$(CONFIG_DM_SWITCH) += dm-switch.o ifeq ($(CONFIG_DM_UEVENT),y) dm-mod-objs += dm-uevent.o
drivers/md/dm-switch.c new file +520 -0
520 lines not on this page · raw message
Alasdair G Kergon
maintainerQuoted 3 lines · Mikulas Patocka
drivers/md/Kconfig | 11 + drivers/md/Makefile | 1 drivers/md/dm-switch.c | 520 +++++++++++++++++++++++++++++++++++++++++++++++++
Please would one of you also propose a Documentation/device-mapper/switch.txt file?
Alasdair
Mikulas Patocka
maintainerQuoted 8 lines · Alasdair G Kergon
Quoted 3 lines · Mikulas Patocka
drivers/md/Kconfig | 11 + drivers/md/Makefile | 1 drivers/md/dm-switch.c | 520 +++++++++++++++++++++++++++++++++++++++++++++++++Please would one of you also propose a
Documentation/device-mapper/switch.txtfile?Alasdair
Here it is:
dm-switch target is suitable for Dell EqualLogic storage system.
The EqualLogic storage consists of several nodes. Each host is connected to each node. The host may send I/O requests to any node, the node that received the requests forwards it to the node where the data is stored.
However, there is a performance advantage of sending I/O requests to the node where the data is stored to avoid forwarding. The dm-switch targets is created to use this performance advantage.
The dm-switch target splits the device to fixed-size pages. It maintains a page table that maps pages to storage nodes. Every request is forwarded to the corresponding storage node specified in the page table. The table may be changed with messages while the dm-switch target is running.
DM table arguments:
- number of storage nodes
- page size
for every storage node:
- the underlying block device
- offset to the start of data in 512-byte sectors
DM message:
set-table index1:node1 index2:node2 index3:node3 ...
- modify page table, set values at index to point to the specific node. Index and node numbers are hexadecimal. You can omit the index number, in this case previous index plus 1 is used.