Skip to contentSkip to conversation

rqbased-dm: change dm-multipath from bio-based to request-based

RFC PATCH In review Kiyoshi Ueda 1 participant 1 message Dec 19, 2006 Device mapper

lore
Share & tools
lore
#0 lore raw

RFC PATCH 8/8 rqbased-dm: change dm-multipath from bio-based to request-based

This patch changes multipath target from bio-based to request-based. Multipath internal queue is deleted because md->queue is used. md->queue is kept in dm_target for easy access from target drivers.

Target internal data (mpath_io) is allocated in prep_map function and the destination path is determined there.

drivers/md/dm-hw-handler.h +1 -0
diff -rupN 7-rqbase-dm-core/drivers/md/dm-hw-handler.h 8-rqbase-dm-mpath/drivers/md/dm-hw-handler.h
@@ -34,6 +34,7 @@ struct hw_handler_type {
 	void (*pg_init) (struct hw_handler *hwh, unsigned bypassed,
 			 struct path *path);
 	unsigned (*error) (struct hw_handler *hwh, struct bio *bio);
+	unsigned (*error_rq) (struct hw_handler *hwh, struct request *rq);
 	int (*status) (struct hw_handler *hwh, status_type_t type,
 		       char *result, unsigned int maxlen);
 };
drivers/md/dm-mpath.c +172 -150

462 lines not on this page · raw message

include/linux/device-mapper.h +2 -0
diff -rupN 7-rqbase-dm-core/include/linux/device-mapper.h 8-rqbase-dm-mpath/include/linux/device-mapper.h
@@ -165,6 +165,8 @@ struct dm_target {
 
 	/* Used to provide an error string from the ctr */
 	char *error;
+
+	struct request_queue *queue;
 };
 
 int dm_register_target(struct target_type *t);