Print this page
13065 log when suspending a zpool
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Toomas Soome <tsoome@me.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zio.c
          +++ new/usr/src/uts/common/fs/zfs/zio.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
  24   24   * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
  25   25   * Copyright (c) 2014 Integros [integros.com]
  26   26   * Copyright (c) 2017, Intel Corporation.
       27 + * Copyright 2020 Joyent, Inc.
  27   28   */
  28   29  
  29   30  #include <sys/sysmacros.h>
  30   31  #include <sys/zfs_context.h>
  31   32  #include <sys/fm/fs/zfs.h>
  32   33  #include <sys/spa.h>
  33   34  #include <sys/txg.h>
  34   35  #include <sys/spa_impl.h>
  35   36  #include <sys/vdev_impl.h>
  36   37  #include <sys/vdev_trim.h>
↓ open down ↓ 1940 lines elided ↑ open up ↑
1977 1978  }
1978 1979  
1979 1980  void
1980 1981  zio_suspend(spa_t *spa, zio_t *zio, zio_suspend_reason_t reason)
1981 1982  {
1982 1983          if (spa_get_failmode(spa) == ZIO_FAILURE_MODE_PANIC)
1983 1984                  fm_panic("Pool '%s' has encountered an uncorrectable I/O "
1984 1985                      "failure and the failure mode property for this pool "
1985 1986                      "is set to panic.", spa_name(spa));
1986 1987  
     1988 +        cmn_err(CE_WARN, "Pool '%s' has encountered an uncorrectable I/O "
     1989 +            "failure and has been suspended; `zpool clear` will be required "
     1990 +            "before the pool can be written to.", spa_name(spa));
     1991 +
1987 1992          zfs_ereport_post(FM_EREPORT_ZFS_IO_FAILURE, spa, NULL,
1988 1993              NULL, NULL, 0, 0);
1989 1994  
1990 1995          mutex_enter(&spa->spa_suspend_lock);
1991 1996  
1992 1997          if (spa->spa_suspend_zio_root == NULL)
1993 1998                  spa->spa_suspend_zio_root = zio_root(spa, NULL, NULL,
1994 1999                      ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE |
1995 2000                      ZIO_FLAG_GODFATHER);
1996 2001  
↓ open down ↓ 2623 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX