]> git.proxmox.com Git - mirror_zfs.git/commit
Fix import finding spare/l2cache when path changes
authorChunwei Chen <david.chen@osnexus.com>
Wed, 24 May 2017 22:11:23 +0000 (15:11 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 1 Jun 2017 13:38:04 +0000 (06:38 -0700)
commit2e9c8dbddfa5d53aa2f9c508e3dc1263d89466ad
tree92f98daf54dbfeaf64e2f5f8ea01d4402f4b0910
parentb568efec526d9336292b37faae951aa9cfb4484c
Fix import finding spare/l2cache when path changes

When spare or l2cache device path changes, zpool import will not fix up
their paths like normal vdev. The issue is that when you supply a pool
name argument to zpool import, it will use it to filter out device which
doesn't have the pool name in the label. Since spare and l2cache device
never have that in the label, they'll always get filtered out.

We fix this by making sure we never filter out a spare or l2cache
device.

Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #6158
lib/libzfs/libzfs_import.c