svn commit: r350339 - in stable/11: sbin/bectl stand/libsa/zfs

Kyle Evans kevans at FreeBSD.org
Fri Jul 26 01:38:25 UTC 2019


Author: kevans
Date: Fri Jul 26 01:38:24 2019
New Revision: 350339
URL: https://svnweb.freebsd.org/changeset/base/350339

Log:
  Partial revert r350338: stable/11 part
  
  The stand/libsa changes were not supposed to ride along with this revision;
  backing out the stable/11 part and re-applying the MFC.
  
  Pointy hat:	kevans

Modified:
  stable/11/sbin/bectl/bectl_jail.c
  stable/11/stand/libsa/zfs/zfs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/bectl/bectl_jail.c
==============================================================================
--- stable/11/sbin/bectl/bectl_jail.c	Fri Jul 26 01:35:06 2019	(r350338)
+++ stable/11/sbin/bectl/bectl_jail.c	Fri Jul 26 01:38:24 2019	(r350339)
@@ -155,7 +155,7 @@ build_jailcmd(char ***argvp, bool interactive, int arg
 			nargv += argc;
 	}
 
-	jargv = *argvp = calloc(nargv, sizeof(*jargv));
+	jargv = *argvp = calloc(nargv, sizeof(jargv));
 	if (jargv == NULL)
 		err(2, "calloc");
 
@@ -346,7 +346,6 @@ bectl_cmd_jail(int argc, char *argv[])
 	case 0:
 		execv("/usr/sbin/jail", jargv);
 		fprintf(stderr, "bectl jail: failed to execute\n");
-		return (1);
 	default:
 		waitpid(pid, NULL, 0);
 	}

Modified: stable/11/stand/libsa/zfs/zfs.c
==============================================================================
--- stable/11/stand/libsa/zfs/zfs.c	Fri Jul 26 01:35:06 2019	(r350338)
+++ stable/11/stand/libsa/zfs/zfs.c	Fri Jul 26 01:38:24 2019	(r350339)
@@ -578,10 +578,11 @@ zfs_probe_dev(const char *devname, uint64_t *pool_guid
 	pa.fd = open(devname, O_RDONLY);
 	if (pa.fd == -1)
 		return (ENXIO);
-	/* Probe the whole disk */
-	ret = zfs_probe(pa.fd, pool_guid);
-	if (ret == 0)
-		return (0);
+	/*
+	 * We will not probe the whole disk, we can not boot from such
+	 * disks and some systems will misreport the disk sizes and will
+	 * hang while accessing the disk.
+	 */
 	if (archsw.arch_getdev((void **)&dev, devname, NULL) == 0) {
 		int partition = dev->d_partition;
 		int slice = dev->d_slice;


More information about the svn-src-stable-11 mailing list