summaryrefslogtreecommitdiffstats
path: root/include/sys/ddt.h
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2018-02-26 16:20:12 -0600
committerBrian Behlendorf <[email protected]>2018-02-26 14:20:12 -0800
commit8b5814393f43d7eb7e4319120529d957a5f7bf8e (patch)
tree41461fa0eaef864af2c2d0819a3ed8fa865403eb /include/sys/ddt.h
parent4af6873af6f8e9f6355e4962262c06d449664d26 (diff)
Incorrect maximum DVA value in DDE_GET_NDVAS()
The conditional was reversed which caused garbage values to be used when calculating dds_ref_dsize. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tom Caputi <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #7234
Diffstat (limited to 'include/sys/ddt.h')
-rw-r--r--include/sys/ddt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/ddt.h b/include/sys/ddt.h
index fc40a495a..fb1445d8d 100644
--- a/include/sys/ddt.h
+++ b/include/sys/ddt.h
@@ -95,7 +95,7 @@ typedef struct ddt_key {
#define DDT_KEY_WORDS (sizeof (ddt_key_t) / sizeof (uint64_t))
#define DDE_GET_NDVAS(dde) (DDK_GET_CRYPT(&dde->dde_key) \
- ? SPA_DVAS_PER_BP : SPA_DVAS_PER_BP - 1)
+ ? SPA_DVAS_PER_BP - 1 : SPA_DVAS_PER_BP)
typedef struct ddt_phys {
dva_t ddp_dva[SPA_DVAS_PER_BP];