[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH RFC 4/5] add support for manual failover devices



04-path-to-dev.patch - adds another accessor so path-selectors can
access a path's bdev. This is necessary for devices which need to
send commands down to the device. (see rdac-test-support.patch)

 dm-mpath.c         |    7 +++++++
 dm-path-selector.h |    2 ++
 2 files changed, 9 insertions(+)
diff -aurp linux-2.6.5-rc1-udm1-orig/drivers/md/dm-mpath.c linux-2.6.5-rc1-udm1-work/drivers/md/dm-mpath.c
--- linux-2.6.5-rc1-udm1-orig/drivers/md/dm-mpath.c	2004-04-04 12:18:13.494803804 -0700
+++ linux-2.6.5-rc1-udm1-work/drivers/md/dm-mpath.c	2004-04-04 12:18:33.603305930 -0700
@@ -42,6 +42,13 @@ struct path {
 	struct priority_group *pg;
 };
 
+inline struct block_device *dm_path_to_bdev(struct path *path)
+{
+	return path->dev->bdev;
+}
+
+EXPORT_SYMBOL(dm_path_to_bdev);
+
 struct priority_group {
 	struct list_head list;
 
diff -aurp linux-2.6.5-rc1-udm1-orig/drivers/md/dm-path-selector.h linux-2.6.5-rc1-udm1-work/drivers/md/dm-path-selector.h
--- linux-2.6.5-rc1-udm1-orig/drivers/md/dm-path-selector.h	2004-04-04 12:18:13.495803681 -0700
+++ linux-2.6.5-rc1-udm1-work/drivers/md/dm-path-selector.h	2004-04-04 12:18:51.689005315 -0700
@@ -16,6 +16,8 @@
 
 struct path;
 
+struct block_device *dm_path_to_bdev(struct path *path);
+
 /*
  * We provide an abstraction for the code that chooses which path
  * to send some io down.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]