Page MenuHomeFreeBSD

D29941.diff
No OneTemporary

D29941.diff

diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c
--- a/sys/geom/multipath/g_multipath.c
+++ b/sys/geom/multipath/g_multipath.c
@@ -394,6 +394,12 @@
mtx_unlock(&sc->sc_mtx);
} else
mtx_unlock(&sc->sc_mtx);
+ if (bp->bio_error == 0 &&
+ bp->bio_cmd == BIO_GETATTR &&
+ !strcmp(bp->bio_attribute, "GEOM::physpath"))
+ {
+ strlcat(bp->bio_data, "/mp", bp->bio_length);
+ }
g_std_done(bp);
}
}
diff --git a/tests/sys/geom/class/multipath/misc.sh b/tests/sys/geom/class/multipath/misc.sh
--- a/tests/sys/geom/class/multipath/misc.sh
+++ b/tests/sys/geom/class/multipath/misc.sh
@@ -198,7 +198,7 @@
atf_test_case physpath cleanup
physpath_head()
{
- atf_set "descr" "gmultipath should pass through the underlying providers' physical path"
+ atf_set "descr" "gmultipath should append /mp to the underlying providers' physical path"
atf_set "require.user" "root"
}
physpath_body()
@@ -217,7 +217,7 @@
atf_check gnop create -z $physpath /dev/${md1}
atf_check -s exit:0 gmultipath create "$name" ${md0}.nop ${md1}.nop
gmultipath_physpath=$(diskinfo -p multipath/"$name")
- atf_check_equal "$physpath" "$gmultipath_physpath"
+ atf_check_equal "$physpath/mp" "$gmultipath_physpath"
}
physpath_cleanup()
{

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 17, 6:51 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15842081
Default Alt Text
D29941.diff (1 KB)

Event Timeline