Try a ps_end_io_fn --- diff/drivers/md/dm-mpath.c 2005-01-12 19:17:02.000000000 +0000 +++ source/drivers/md/dm-mpath.c 2005-01-12 19:17:12.000000000 +0000 @@ -957,9 +957,13 @@ { struct multipath *m = (struct multipath *) ti->private; struct mpath_io *mpio = (struct mpath_io *) map_context->ptr; + struct pgpath *pgpath = mpio->pgpath; + struct path_selector *ps = &pgpath->pg->ps; int r; r = do_end_io(m, bio, error, mpio); + if (ps->type->end_io) + ps->type->end_io(ps, &pgpath->path); if (r <= 0) mempool_free(mpio, m->mpio_pool); --- diff/drivers/md/dm-path-selector.h 2005-01-12 19:00:22.000000000 +0000 +++ source/drivers/md/dm-path-selector.h 2005-01-12 19:17:12.000000000 +0000 @@ -71,6 +71,8 @@ status_type_t type, char *result, unsigned int maxlen); +typedef int (*ps_end_io_fn) (struct path_selector *ps, struct path *path); + /* Information about a path selector type */ struct path_selector_type { char *name; @@ -86,6 +88,7 @@ ps_reinstate_path_fn reinstate_path; ps_select_path_fn select_path; ps_status_fn status; + ps_end_io_fn end_io; }; /* Register a path selector */