]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r324940:
authorasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 5 Mar 2018 20:43:43 +0000 (20:43 +0000)
committerasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 5 Mar 2018 20:43:43 +0000 (20:43 +0000)
commitf876360af3be0bec46eb01b802b6119b9ba85dfe
treee8ce516d897a64419a084a8d5aed4db4d73e58ae
parentb19e4289bad61eb47f3f568e41c2a1098d249179
MFC r324940:

Fix the error message when creating a zpool on a too-small device

Don't check for SPA_MINDEVSIZE in vdev_geom_attach when opening by path.
It's redundant with the check in vdev_open, and failing to attach here
results in the wrong error message being printed.  However, still check for
it in some other situations:

* When opening by guids, so we don't get bogged down reading from slow
  devices like floppy drives.
* In vdev_geom_read_pool_label for the same reason, because we iterate over
  all providers.
* If the caller requests that we verify the guid, because then we'll have to
  read from the device before vdev_open verifies the size.

PR: 222227
Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Reviewed by: avg, mav
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12531

git-svn-id: svn://svn.freebsd.org/base/stable/10@330524 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c