diff options
author | Matthew Ahrens <[email protected]> | 2019-06-19 14:54:02 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-06-19 14:54:02 -0700 |
commit | 050d720c43b6285fc0c30e1e97591f6b796dbd68 (patch) | |
tree | 1186ac17585e51e426282f3fd3d114913084fcf3 /include | |
parent | fb0be12d7b6db16eabfe8f91da12da7d7854ea9a (diff) |
Remove dedupditto functionality
If dedup is in use, the `dedupditto` property can be set, causing ZFS to
keep an extra copy of data that is referenced many times (>100x). The
idea was that this data is more important than other data and thus we
want to be really sure that it is not lost if the disk experiences a
small amount of random corruption.
ZFS (and system administrators) rely on the pool-level redundancy to
protect their data (e.g. mirroring or RAIDZ). Since the user/sysadmin
doesn't have control over what data will be offered extra redundancy by
dedupditto, this extra redundancy is not very useful. The bulk of the
data is still vulnerable to loss based on the pool-level redundancy.
For example, if particle strikes corrupt 0.1% of blocks, you will either
be saved by mirror/raidz, or you will be sad. This is true even if
dedupditto saved another 0.01% of blocks from being corrupted.
Therefore, the dedupditto functionality is rarely enabled (i.e. the
property is rarely set), and it fulfills its promise of increased
redundancy even more rarely.
Additionally, this feature does not work as advertised (on existing
releases), because scrub/resilver did not repair the extra (dedupditto)
copy (see https://github.com/zfsonlinux/zfs/pull/8270).
In summary, this seldom-used feature doesn't work, and even if it did it
wouldn't provide useful data protection. It has a non-trivial
maintenance burden (again see https://github.com/zfsonlinux/zfs/pull/8270).
We should remove the dedupditto functionality. For backwards
compatibility with the existing CLI, "zpool set dedupditto" will still
"succeed" (exit code zero), but won't have any effect. For backwards
compatibility with existing pools that had dedupditto enabled at some
point, the code will still be able to understand dedupditto blocks and
free them when appropriate. However, ZFS won't write any new dedupditto
blocks.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: Alek Pinchuk <[email protected]>
Issue #8270
Closes #8310
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/ddt.h | 8 | ||||
-rw-r--r-- | include/sys/spa_impl.h | 1 | ||||
-rw-r--r-- | include/sys/zio.h | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/include/sys/ddt.h b/include/sys/ddt.h index fb1445d8d..21b76f7ba 100644 --- a/include/sys/ddt.h +++ b/include/sys/ddt.h @@ -103,6 +103,10 @@ typedef struct ddt_phys { uint64_t ddp_phys_birth; } ddt_phys_t; +/* + * Note, we no longer generate new DDT_PHYS_DITTO-type blocks. However, + * we maintain the ability to free existing dedup-ditto blocks. + */ enum ddt_phys_type { DDT_PHYS_DITTO = 0, DDT_PHYS_SINGLE = 1, @@ -216,10 +220,6 @@ extern void ddt_get_dedup_stats(spa_t *spa, ddt_stat_t *dds_total); extern uint64_t ddt_get_dedup_dspace(spa_t *spa); extern uint64_t ddt_get_pool_dedup_ratio(spa_t *spa); -extern int ddt_ditto_copies_needed(ddt_t *ddt, ddt_entry_t *dde, - ddt_phys_t *ddp_willref); -extern int ddt_ditto_copies_present(ddt_entry_t *dde); - extern size_t ddt_compress(void *src, uchar_t *dst, size_t s_len, size_t d_len); extern void ddt_decompress(uchar_t *src, void *dst, size_t s_len, size_t d_len); diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h index 66032d9aa..d49b970c9 100644 --- a/include/sys/spa_impl.h +++ b/include/sys/spa_impl.h @@ -350,7 +350,6 @@ struct spa { ddt_t *spa_ddt[ZIO_CHECKSUM_FUNCTIONS]; /* in-core DDTs */ uint64_t spa_ddt_stat_object; /* DDT statistics */ uint64_t spa_dedup_dspace; /* Cache get_dedup_dspace() */ - uint64_t spa_dedup_ditto; /* dedup ditto threshold */ uint64_t spa_dedup_checksum; /* default dedup checksum */ uint64_t spa_dspace; /* dspace in normal class */ kmutex_t spa_vdev_top_lock; /* dueling offline/remove */ diff --git a/include/sys/zio.h b/include/sys/zio.h index e69bf9208..bf441ff8d 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -102,7 +102,6 @@ enum zio_checksum { #define ZIO_CHECKSUM_VERIFY (1 << 8) #define ZIO_DEDUPCHECKSUM ZIO_CHECKSUM_SHA256 -#define ZIO_DEDUPDITTO_MIN 100 /* supported encryption algorithms */ enum zio_encrypt { |