Module Name:    src
Committed By:   jmcneill
Date:           Sun Jun 21 21:29:11 UTC 2020

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs: vdev_disk.c

Log Message:
If calling d_minphys on the parent disk device, make sure we use the
parent disk device's dev_t. Fixes zfs on wedges on ld(4).

XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
    src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.16 src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.17
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.16	Wed Apr 29 04:30:40 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c	Sun Jun 21 21:29:11 2020
@@ -229,11 +229,12 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi
 	*/
 	{
 		struct buf buf = {
-			.b_dev = vp->v_rdev,
 			.b_bcount = MAXPHYS,
 		};
-		if (pdk && pdk->dk_driver && pdk->dk_driver->d_minphys)
+		if (pdk && pdk->dk_driver && pdk->dk_driver->d_minphys) {
+			buf.b_dev = pdk->dk_rawvp->v_rdev;
 			(*pdk->dk_driver->d_minphys)(&buf);
+		}
 		dvd->vd_maxphys = buf.b_bcount;
 	}
 

Reply via email to