mirror_zfs/lib/libzfs
Brian Behlendorf 30b937ee15 Update spare and cache device names on import
During 'zpool import' all ZPOOL_CONFIG_PATH names are supposed
to be updated by fix_paths().  This was not happening for spare
and cache devices because the proper names were getting filtered
out of the pool_list_t->names.  Interestingly, the names were
being filtered because the spare and cache devices do not
contain the pool name in their vdev label.

The fix is to exclude the device path from the list only if:

  1) has a valid ZPOOL_CONFIG_POOL_NAME key in the label, and
  2) that pool name does not match the specified pool name.

Since the label is valid and because it does properly store the
vdev guid it will be correctly assembled without the pool name.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #725
2012-10-22 08:46:02 -07:00
..
libzfs_changelist.c Remove HAVE_ZPL from commands and libraries 2011-02-04 16:14:34 -08:00
libzfs_config.c Illumos #1796, #2871, #2903, #2957 2012-08-23 10:40:02 -07:00
libzfs_dataset.c Illumos #3100: zvol rename fails with EBUSY when dirty. 2012-10-03 13:59:02 -07:00
libzfs_diff.c Add linux compatibility 2010-08-31 13:41:59 -07:00
libzfs_fru.c Add linux topology support 2010-08-31 13:42:00 -07:00
libzfs_graph.c Fix gcc missing braces warnings 2010-08-27 15:34:03 -07:00
libzfs_import.c Update spare and cache device names on import 2012-10-22 08:46:02 -07:00
libzfs_iter.c Illumos #1644, #1645, #1646, #1647, #1708 2012-07-31 09:25:30 -07:00
libzfs_mount.c Add overlay(-O) mount option support 2012-01-12 15:49:38 -08:00
libzfs_pool.c Allow 'zpool replace' to use short device names 2012-10-22 08:45:58 -07:00
libzfs_sendrecv.c Illumos #2703: add mechanism to report ZFS send progress 2012-09-19 13:39:06 -07:00
libzfs_status.c Use gethostid in the Linux convention. 2011-04-25 10:36:17 -05:00
libzfs_util.c Allow 'zpool replace' to use short device names 2012-10-22 08:45:58 -07:00
Makefile.am Illumos #1644, #1645, #1646, #1647, #1708 2012-07-31 09:25:30 -07:00