aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mount_zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-03-20 15:10:24 -0700
committerBrian Behlendorf <[email protected]>2015-03-25 14:52:52 -0700
commit7d90f569b3f05def7cbd0a52ce8ac3040364d702 (patch)
treea1762d37a003105fae3c547b1d0272c8aca4526a /cmd/mount_zfs
parent58806b4cdc32e6f4e4a214cfba3b62a24efb34b7 (diff)
Check all vdev labels in 'zpool import'
When using 'zpool import' to scan for available pools prefer vdev names which reference vdevs with more valid labels. There should be two labels at the start of the device and two labels at the end of the device. If labels are missing then the device has been damaged or is in some other way incomplete. Preferring names with fully intact labels helps weed out bad paths and improves the likelihood of being able to import the pool. This behavior only applies when scanning /dev/ for valid pools. If a cache file exists the pools described by the cache file will be used. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Chris Dunlap <[email protected]> Closes #3145 Closes #2844 Closes #3107
Diffstat (limited to 'cmd/mount_zfs')
-rw-r--r--cmd/mount_zfs/mount_zfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c
index b168f719a..6cdb668f5 100644
--- a/cmd/mount_zfs/mount_zfs.c
+++ b/cmd/mount_zfs/mount_zfs.c
@@ -239,7 +239,7 @@ parse_dataset(char *dataset)
if (fd < 0)
goto out;
- error = zpool_read_label(fd, &config);
+ error = zpool_read_label(fd, &config, NULL);
(void) close(fd);
if (error)
goto out;