]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/spa.c
Add generic errata infrastructure
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 21 Feb 2014 03:57:17 +0000 (19:57 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 21 Feb 2014 20:10:40 +0000 (12:10 -0800)
commitffe9d38275f63dbd0e6a23f3dd310249684ad518
treef7c69786439917226116c9567fa1e8df1027aa14
parent731782ec316656c0d1b78d6c9f0194d35ebb7eff
Add generic errata infrastructure

From time to time it may be necessary to inform the pool administrator
about an errata which impacts their pool.  These errata will by shown
to the administrator through the 'zpool status' and 'zpool import'
output as appropriate.  The errata must clearly describe the issue
detected, how the pool is impacted, and what action should be taken
to resolve the situation.  Additional information for each errata will
be provided at http://zfsonlinux.org/msg/ZFS-8000-ER.

To accomplish the above this patch adds the required infrastructure to
allow the kernel modules to notify the utilities that an errata has
been detected.  This is done through the ZPOOL_CONFIG_ERRATA uint64_t
which has been added to the pool configuration nvlist.

To add a new errata the following changes must be made:

* A new errata identifier must be assigned by adding a new enum value
  to the zpool_errata_t type.  New enums must be added to the end to
  preserve the existing ordering.

* Code must be added to detect the issue.  This does not strictly
  need to be done at pool import time but doing so will make the
  errata visible in 'zpool import' as well as 'zpool status'.  Once
  detected the spa->spa_errata member should be set to the new enum.

* If possible code should be added to clear the spa->spa_errata member
  once the errata has been resolved.

* The show_import() and status_callback() functions must be updated
  to include an informational message describing the errata.  This
  should include an action message describing what an administrator
  should do to address the errata.

* The documentation at http://zfsonlinux.org/msg/ZFS-8000-ER must be
  updated to describe the errata.  This space can be used to provide
  as much additional information as needed to fully describe the errata.
  A link to this documentation will be automatically generated in the
  output of 'zpool import' and 'zpool status'.

Original-idea-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Richard Yao <ryao@gentoo.or
Issue #2094
cmd/zpool/zpool_main.c
include/libzfs.h
include/sys/fs/zfs.h
include/sys/spa_impl.h
lib/libzfs/libzfs_status.c
module/zfs/spa.c
module/zfs/spa_config.c