FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 09-12-2008, 02:52 PM
Kiyoshi Ueda
 
Default dm-mpath: add a path selector interface

This patch adds a new hook for dm path selector: start_io.
Target drivers should call this hook before submitting I/O to
the selected path.
Path selectors can use it to start accounting of the I/O.
(e.g. counting the number of in-flight I/Os.)

The code is based on the patch posted by Stefan Bader:
https://www.redhat.com/archives/dm-devel/2005-October/msg00050.html


Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
---
drivers/md/dm-mpath.c | 3 +++
drivers/md/dm-path-selector.h | 1 +
2 files changed, 4 insertions(+)

Index: 2.6.27-rc6/drivers/md/dm-mpath.c
================================================== =================
--- 2.6.27-rc6.orig/drivers/md/dm-mpath.c
+++ 2.6.27-rc6/drivers/md/dm-mpath.c
@@ -343,6 +343,9 @@ static int map_io(struct multipath *m, s

mpio->pgpath = pgpath;

+ if (r == DM_MAPIO_REMAPPED && pgpath->pg->ps.type->start_io)
+ pgpath->pg->ps.type->start_io(&pgpath->pg->ps, &pgpath->path);
+
spin_unlock_irqrestore(&m->lock, flags);

return r;
Index: 2.6.27-rc6/drivers/md/dm-path-selector.h
================================================== =================
--- 2.6.27-rc6.orig/drivers/md/dm-path-selector.h
+++ 2.6.27-rc6/drivers/md/dm-path-selector.h
@@ -75,6 +75,7 @@ struct path_selector_type {
int (*status) (struct path_selector *ps, struct dm_path *path,
status_type_t type, char *result, unsigned int maxlen);

+ int (*start_io) (struct path_selector *ps, struct dm_path *path);
int (*end_io) (struct path_selector *ps, struct dm_path *path);
};


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 01-29-2009, 06:02 AM
Kiyoshi Ueda
 
Default dm-mpath: add a path selector interface

This patch adds a new hook for dm path selector: start_io.
Target drivers should call this hook before submitting I/O to
the selected path.
Path selectors can use it to start accounting of the I/O.
(e.g. counting the number of in-flight I/Os.)

The code is based on the patch posted by Stefan Bader:
https://www.redhat.com/archives/dm-devel/2005-October/msg00050.html


Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Vijayakumar Balasubramanian <vijayakumar@hp.com>
Cc: Alasdair G Kergon <agk@redhat.com>
---
drivers/md/dm-mpath.c | 3 +++
drivers/md/dm-path-selector.h | 1 +
2 files changed, 4 insertions(+)

Index: 2.6.29-rc2/drivers/md/dm-mpath.c
================================================== =================
--- 2.6.29-rc2.orig/drivers/md/dm-mpath.c
+++ 2.6.29-rc2/drivers/md/dm-mpath.c
@@ -361,6 +361,9 @@ static int map_io(struct multipath *m, s

mpio->pgpath = pgpath;

+ if (r == DM_MAPIO_REMAPPED && pgpath->pg->ps.type->start_io)
+ pgpath->pg->ps.type->start_io(&pgpath->pg->ps, &pgpath->path);
+
spin_unlock_irqrestore(&m->lock, flags);

return r;
Index: 2.6.29-rc2/drivers/md/dm-path-selector.h
================================================== =================
--- 2.6.29-rc2.orig/drivers/md/dm-path-selector.h
+++ 2.6.29-rc2/drivers/md/dm-path-selector.h
@@ -75,6 +75,7 @@ struct path_selector_type {
int (*status) (struct path_selector *ps, struct dm_path *path,
status_type_t type, char *result, unsigned int maxlen);

+ int (*start_io) (struct path_selector *ps, struct dm_path *path);
int (*end_io) (struct path_selector *ps, struct dm_path *path);
};


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 07:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org