From owner-svn-src-all@freebsd.org Thu Oct 22 20:02:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B3954294FD; Thu, 22 Oct 2020 20:02:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CHJDC1MBvz4RhB; Thu, 22 Oct 2020 20:02:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11F481C2A4; Thu, 22 Oct 2020 20:02:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09MK22Il041520; Thu, 22 Oct 2020 20:02:02 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09MK22Le041519; Thu, 22 Oct 2020 20:02:02 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202010222002.09MK22Le041519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 22 Oct 2020 20:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366951 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 366951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2020 20:02:03 -0000 Author: tsoome Date: Thu Oct 22 20:02:02 2020 New Revision: 366951 URL: https://svnweb.freebsd.org/changeset/base/366951 Log: loader: revert r342161 and r342151 We are using asize property from pool label and we do not depend on partition data to find last two pool labels and to validate LBA for disk IO. This does allow us to re-enable support for partitionless disk setups. Modified: head/stand/libsa/zfs/zfs.c Modified: head/stand/libsa/zfs/zfs.c ============================================================================== --- head/stand/libsa/zfs/zfs.c Thu Oct 22 19:28:12 2020 (r366950) +++ head/stand/libsa/zfs/zfs.c Thu Oct 22 20:02:02 2020 (r366951) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1421,7 +1420,6 @@ zfs_attach_nvstore(void *vdev) int zfs_probe_dev(const char *devname, uint64_t *pool_guid) { - struct disk_devdesc *dev; struct ptable *table; struct zfs_probe_args pa; uint64_t mediasz; @@ -1432,22 +1430,10 @@ zfs_probe_dev(const char *devname, uint64_t *pool_guid pa.fd = open(devname, O_RDWR); if (pa.fd == -1) return (ENXIO); - /* - * 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; - - free(dev); - if (partition != D_PARTNONE && slice != D_SLICENONE) { - ret = zfs_probe(pa.fd, pool_guid); - if (ret == 0) - return (0); - } - } + /* Probe the whole disk */ + ret = zfs_probe(pa.fd, pool_guid); + if (ret == 0) + return (0); /* Probe each partition */ ret = ioctl(pa.fd, DIOCGMEDIASIZE, &mediasz);