Print this page
1693 persistent 'comment' field for a zpool

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/fs/zfs.h
          +++ new/usr/src/uts/common/sys/fs/zfs.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  24   25   * Copyright (c) 2011 by Delphix. All rights reserved.
  25   26   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  26   27   */
  27   28  
  28   29  /* Portions Copyright 2010 Robert Milkowski */
  29   30  
  30   31  #ifndef _SYS_FS_ZFS_H
  31   32  #define _SYS_FS_ZFS_H
  32   33  
  33   34  #include <sys/time.h>
↓ open down ↓ 123 lines elided ↑ open up ↑
 157  158          ZPOOL_PROP_AUTOREPLACE,
 158  159          ZPOOL_PROP_CACHEFILE,
 159  160          ZPOOL_PROP_FAILUREMODE,
 160  161          ZPOOL_PROP_LISTSNAPS,
 161  162          ZPOOL_PROP_AUTOEXPAND,
 162  163          ZPOOL_PROP_DEDUPDITTO,
 163  164          ZPOOL_PROP_DEDUPRATIO,
 164  165          ZPOOL_PROP_FREE,
 165  166          ZPOOL_PROP_ALLOCATED,
 166  167          ZPOOL_PROP_READONLY,
      168 +        ZPOOL_PROP_COMMENT,
 167  169          ZPOOL_NUM_PROPS
 168  170  } zpool_prop_t;
 169  171  
      172 +/* Small enough to not hog a whole line of printout in zpool(1M). */
      173 +#define ZPROP_MAX_COMMENT       32
      174 +
 170  175  #define ZPROP_CONT              -2
 171  176  #define ZPROP_INVAL             -1
 172  177  
 173  178  #define ZPROP_VALUE             "value"
 174  179  #define ZPROP_SOURCE            "source"
 175  180  
 176  181  typedef enum {
 177  182          ZPROP_SRC_NONE = 0x1,
 178  183          ZPROP_SRC_DEFAULT = 0x2,
 179  184          ZPROP_SRC_TEMPORARY = 0x4,
↓ open down ↓ 304 lines elided ↑ open up ↑
 484  489  #define ZPOOL_CONFIG_IS_HOLE            "is_hole"
 485  490  #define ZPOOL_CONFIG_DDT_HISTOGRAM      "ddt_histogram"
 486  491  #define ZPOOL_CONFIG_DDT_OBJ_STATS      "ddt_object_stats"
 487  492  #define ZPOOL_CONFIG_DDT_STATS          "ddt_stats"
 488  493  #define ZPOOL_CONFIG_SPLIT              "splitcfg"
 489  494  #define ZPOOL_CONFIG_ORIG_GUID          "orig_guid"
 490  495  #define ZPOOL_CONFIG_SPLIT_GUID         "split_guid"
 491  496  #define ZPOOL_CONFIG_SPLIT_LIST         "guid_list"
 492  497  #define ZPOOL_CONFIG_REMOVING           "removing"
 493  498  #define ZPOOL_CONFIG_RESILVERING        "resilvering"
      499 +#define ZPOOL_CONFIG_COMMENT            "comment"
 494  500  #define ZPOOL_CONFIG_SUSPENDED          "suspended"     /* not stored on disk */
 495  501  #define ZPOOL_CONFIG_TIMESTAMP          "timestamp"     /* not stored on disk */
 496  502  #define ZPOOL_CONFIG_BOOTFS             "bootfs"        /* not stored on disk */
 497  503  #define ZPOOL_CONFIG_MISSING_DEVICES    "missing_vdevs" /* not stored on disk */
 498  504  #define ZPOOL_CONFIG_LOAD_INFO          "load_info"     /* not stored on disk */
 499  505  /*
 500  506   * The persistent vdev state is stored as separate values rather than a single
 501  507   * 'vdev_state' entry.  This is because a device can be in multiple states, such
 502  508   * as offline and degraded.
 503  509   */
↓ open down ↓ 414 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX