Module Name:    src
Committed By:   riastradh
Date:           Wed Apr 29 04:30:40 UTC 2020

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

Log Message:
Set up more of a fake struct buf, for ldminphys.

Fixes:

arm64# zpool create rpool ld4
[ 198.4376097] panic: Trap: Data Abort (EL1): Translation Fault L1 with read 
access for 0000000000000178: pc ffffc0000017acf4: opcode f940bc00: ldr x0, 
[x0,#376]
[ 198.4694793] fp ffffc00073026660 ldminphys() at ffffc0000017acf4 
netbsd:ldminphys+0x34
[ 198.4792624] fp ffffc00073026680 vdev_disk_open.part.4() at ffffc000013d4c4c 
zfs:vdev_disk_open.part.4+0x37c
[ 198.4792624] fp ffffc000730268d0 vdev_open() at ffffc000013d2530 
zfs:vdev_open+0x68
[ 198.4792624] fp ffffc00073026920 vdev_open_children() at ffffc000013d2958 
zfs:vdev_open_children+0x40
[ 198.4792624] fp ffffc00073026950 vdev_root_open() at ffffc000013dad48 
zfs:vdev_root_open+0x30

XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
    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.15 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.15	Mon Mar  2 16:01:56 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c	Wed Apr 29 04:30:40 2020
@@ -228,7 +228,10 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi
 		dvd->vd_maxphys = (pdk ? disk_maxphys(pdk) : MACHINE_MAXPHYS);
 	*/
 	{
-		struct buf buf = { .b_bcount = MAXPHYS };
+		struct buf buf = {
+			.b_dev = vp->v_rdev,
+			.b_bcount = MAXPHYS,
+		};
 		if (pdk && pdk->dk_driver && pdk->dk_driver->d_minphys)
 			(*pdk->dk_driver->d_minphys)(&buf);
 		dvd->vd_maxphys = buf.b_bcount;

Reply via email to