Skip to contentSkip to conversation

multipath: implement controller framework for hardware handlers (fwd)

PATCH Chip Coldwell 2 participants 2 messages Nov 19, 2007 1 message not in the archive Device mapper

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

From: Hannes Reinecke <[email protected]>

drivers/md/dm-hw-handler.h +0 -0
Quoted 17 lines

index 9216682..6f91b55 100644

drivers/md/dm-hw-handler.h +10 -0
@@ -15,10 +15,31 @@
 
 struct hw_handler_type;
 
+#define CTLR_ID_LEN 256
+
+struct hw_controller {
+	struct list_head node;
+	struct hw_controller_type *type;
+	unsigned char ctlr_id[CTLR_ID_LEN];
+	struct kref kref;
+	spinlock_t lock;
+	struct list_head cmd_list;
+	int submitted;

drivers/md/dm-hw-handler.h line 37

Quoted 10 lines
drivers/md/dm-hw-handler.h +10 -0
+	void *context;
+};
+
+struct hw_controller_type {
+	char *name;
+
+	int (*create) (struct hw_controller *ctlr);
+	void (*destroy) (struct hw_controller *ctlr);
+};
+

Would it make sense to make hw_controller_type a kobj_type? That way, the controller topology could be reflected in sysfs, where it can be reached by tools such as lsscsi.

Chip

Signature · 4 lines
Charles M. "Chip" Coldwell
Senior Software Engineer
Red Hat, Inc
978-392-2426
#2 lore raw
Quoted 25 lines · Chip Coldwell

From: Hannes Reinecke <[email protected]>

drivers/md/dm-hw-handler.h +0 -0
Quoted 23 lines

index 9216682..6f91b55 100644

drivers/md/dm-hw-handler.h +16 -0
@@ -15,10 +15,31 @@
 
 struct hw_handler_type;
 
+#define CTLR_ID_LEN 256
+
+struct hw_controller {
+	struct list_head node;
+	struct hw_controller_type *type;
+	unsigned char ctlr_id[CTLR_ID_LEN];
+	struct kref kref;
+	spinlock_t lock;
+	struct list_head cmd_list;
+	int submitted;
+	void *context;
+};
+
+struct hw_controller_type {
+	char *name;
+
Quoted 9 lines

drivers/md/dm-hw-handler.h line 37

Quoted 4 lines
drivers/md/dm-hw-handler.h +4 -0
+	int (*create) (struct hw_controller *ctlr);
+	void (*destroy) (struct hw_controller *ctlr);
+};
+

Would it make sense to make hw_controller_type a kobj_type? That way, the controller topology could be reflected in sysfs, where it can be reached by tools such as lsscsi.

Eventually, maybe.

Plan is to add userland support to manually declare and assign controller to each priority group.
But I haven't really sorted out the details there (how to pass information etc) and I really would like to have the basic infrastructure agreed upon first.
And implementing a kobj_type at this point would be a bit over the top as we are in the very preliminary stages here.

Once the controller framework is accepted we can think about it.

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)