summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2009-08-09 16:55:03 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2009-08-09 16:55:03 +0000
commita28a6d2f7136b87cf653490dafcb811cd3e132a0 (patch)
tree9eb9662ca009dc222615259bd2875e5d63d6478e
parent3e381e33363dba263e28a98089ccfca871d6efb3 (diff)
shove a minphys request against mpath down all to the minphys on each path
so we can guarantee that any of the paths we push the io down later will work. with help from a discussion from beck and krw
-rw-r--r--sys/scsi/mpath.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c
index df0f3c2c620..c5c517a94f3 100644
--- a/sys/scsi/mpath.c
+++ b/sys/scsi/mpath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpath.c,v 1.2 2009/08/09 16:20:19 dlg Exp $ */
+/* $OpenBSD: mpath.c,v 1.3 2009/08/09 16:55:02 dlg Exp $ */
/*
* Copyright (c) 2009 David Gwynne <dlg@openbsd.org>
@@ -75,6 +75,7 @@ struct cfdriver mpath_cd = {
};
int mpath_cmd(struct scsi_xfer *);
+void mpath_minphys(struct buf *, struct scsi_link *);
int mpath_probe(struct scsi_link *);
struct scsi_adapter mpath_switch = {
@@ -179,6 +180,19 @@ mpath_cmd(struct scsi_xfer *xs)
return (COMPLETE);
}
+void
+mpath_minphys(struct buf *bp, struct scsi_link *link)
+{
+ struct mpath_node *n = mpath_nodes[link->target];
+ struct mpath_path *p;
+
+ if (n == NULL)
+ return;
+
+ TAILQ_FOREACH(p, &n->node_paths, path_entry)
+ p->path_link->adapter->scsi_minphys(bp, p->path_link);
+}
+
int
mpath_path_attach(struct scsi_link *link)
{