Print this page
Integrated Edon-R hash function.

Split Close
Expand all
Collapse all
          --- old/usr/src/common/zfs/zfs_prop.c
          +++ new/usr/src/common/zfs/zfs_prop.c
↓ open down ↓ 56 lines elided ↑ open up ↑
  57   57  zprop_desc_t *
  58   58  zfs_prop_get_table(void)
  59   59  {
  60   60          return (zfs_prop_table);
  61   61  }
  62   62  
  63   63  void
  64   64  zfs_prop_init(void)
  65   65  {
  66   66          static zprop_index_t checksum_table[] = {
  67      -                { "on",         ZIO_CHECKSUM_ON },
  68      -                { "off",        ZIO_CHECKSUM_OFF },
  69      -                { "fletcher2",  ZIO_CHECKSUM_FLETCHER_2 },
  70      -                { "fletcher4",  ZIO_CHECKSUM_FLETCHER_4 },
  71      -                { "sha256",     ZIO_CHECKSUM_SHA256 },
       67 +                { "on",                 ZIO_CHECKSUM_ON },
       68 +                { "off",                ZIO_CHECKSUM_OFF },
       69 +                { "fletcher2",          ZIO_CHECKSUM_FLETCHER_2 },
       70 +                { "fletcher4",          ZIO_CHECKSUM_FLETCHER_4 },
       71 +                { "sha256",             ZIO_CHECKSUM_SHA256 },
       72 +                { "edonr512/256",       ZIO_CHECKSUM_EDONR512_256 },
  72   73                  { NULL }
  73   74          };
  74   75  
  75   76          static zprop_index_t dedup_table[] = {
  76      -                { "on",         ZIO_CHECKSUM_ON },
  77      -                { "off",        ZIO_CHECKSUM_OFF },
  78      -                { "verify",     ZIO_CHECKSUM_ON | ZIO_CHECKSUM_VERIFY },
  79      -                { "sha256",     ZIO_CHECKSUM_SHA256 },
       77 +                { "on",                 ZIO_CHECKSUM_ON },
       78 +                { "off",                ZIO_CHECKSUM_OFF },
       79 +                { "verify",             ZIO_CHECKSUM_ON | ZIO_CHECKSUM_VERIFY },
       80 +                { "sha256",             ZIO_CHECKSUM_SHA256 },
  80   81                  { "sha256,verify",
  81      -                                ZIO_CHECKSUM_SHA256 | ZIO_CHECKSUM_VERIFY },
       82 +                        ZIO_CHECKSUM_SHA256 | ZIO_CHECKSUM_VERIFY },
       83 +                { "edonr512/256",       ZIO_CHECKSUM_EDONR512_256 },
       84 +                { "edonr512/256,verify",
       85 +                        ZIO_CHECKSUM_EDONR512_256 | ZIO_CHECKSUM_VERIFY },
  82   86                  { NULL }
  83   87          };
  84   88  
  85   89          static zprop_index_t compress_table[] = {
  86   90                  { "on",         ZIO_COMPRESS_ON },
  87   91                  { "off",        ZIO_COMPRESS_OFF },
  88   92                  { "lzjb",       ZIO_COMPRESS_LZJB },
  89   93                  { "gzip",       ZIO_COMPRESS_GZIP_6 },  /* gzip default */
  90   94                  { "gzip-1",     ZIO_COMPRESS_GZIP_1 },
  91   95                  { "gzip-2",     ZIO_COMPRESS_GZIP_2 },
↓ open down ↓ 105 lines elided ↑ open up ↑
 197  201          };
 198  202  
 199  203          /* inherit index properties */
 200  204          zprop_register_index(ZFS_PROP_SYNC, "sync", ZFS_SYNC_STANDARD,
 201  205              PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
 202  206              "standard | always | disabled", "SYNC",
 203  207              sync_table);
 204  208          zprop_register_index(ZFS_PROP_CHECKSUM, "checksum",
 205  209              ZIO_CHECKSUM_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM |
 206  210              ZFS_TYPE_VOLUME,
 207      -            "on | off | fletcher2 | fletcher4 | sha256", "CHECKSUM",
 208      -            checksum_table);
      211 +            "on | off | fletcher2 | fletcher4 | sha256 | edonr512/256",
      212 +            "CHECKSUM", checksum_table);
 209  213          zprop_register_index(ZFS_PROP_DEDUP, "dedup", ZIO_CHECKSUM_OFF,
 210  214              PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
 211      -            "on | off | verify | sha256[,verify]", "DEDUP",
 212      -            dedup_table);
      215 +            "on | off | verify | sha256[,verify] | edonr512/256[,verify]",
      216 +            "DEDUP", dedup_table);
 213  217          zprop_register_index(ZFS_PROP_COMPRESSION, "compression",
 214  218              ZIO_COMPRESS_DEFAULT, PROP_INHERIT,
 215  219              ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
 216  220              "on | off | lzjb | gzip | gzip-[1-9] | zle | lz4",
 217  221              "COMPRESS", compress_table);
 218  222          zprop_register_index(ZFS_PROP_SNAPDIR, "snapdir", ZFS_SNAPDIR_HIDDEN,
 219  223              PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
 220  224              "hidden | visible", "SNAPDIR", snapdir_table);
 221  225          zprop_register_index(ZFS_PROP_ACLMODE, "aclmode", ZFS_ACL_DISCARD,
 222  226              PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
↓ open down ↓ 400 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX