blob: cd7653ff16d4b59c895d4f7f4bd51c2f561d68a7 [file] [log] [blame] [raw]
Store GEOM provider name in vdev_devid instead of vdev_physpath.
This is closer to Solaris.
diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c freebsd-10.3/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
--- /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c 2016-03-25 09:09:26.000000000 +0800
+++ freebsd-10.3/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c 2019-05-04 14:49:39.186079634 +0800
@@ -737,11 +737,11 @@
*/
vd->vdev_nowritecache = B_FALSE;
- if (vd->vdev_physpath != NULL)
- spa_strfree(vd->vdev_physpath);
- bufsize = sizeof("/dev/") + strlen(pp->name);
- vd->vdev_physpath = kmem_alloc(bufsize, KM_SLEEP);
- snprintf(vd->vdev_physpath, bufsize, "/dev/%s", pp->name);
+ if (vd->vdev_devid != NULL)
+ spa_strfree(vd->vdev_devid);
+ bufsize = strlen(pp->name) + 1;
+ vd->vdev_devid = kmem_alloc(bufsize, KM_SLEEP);
+ memcpy(vd->vdev_devid, pp->name, bufsize);
/*
* Determine the device's rotation rate.