From c2ade42dd35466d90aa6fc7cc717f396e165492f Mon Sep 17 00:00:00 2001 From: David Teigland Date: Mon, 26 Jun 2006 00:27:33 -0700 Subject: [PATCH] dm: create error table Add a library function dm_create_error_table() to create a table that rejects any I/O sent to a device with EIO. Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/device-mapper.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux/device-mapper.h') diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 010c8c5eeb3..61103d2bc24 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -227,5 +227,11 @@ void dm_table_event(struct dm_table *t); */ int dm_swap_table(struct mapped_device *md, struct dm_table *t); +/* + * Prepare a table for a device that will error all I/O. + * To make it active, call dm_suspend(), dm_swap_table() then dm_resume(). + */ +int dm_create_error_table(struct dm_table **result, struct mapped_device *md); + #endif /* __KERNEL__ */ #endif /* _LINUX_DEVICE_MAPPER_H */ -- cgit v1.2.3