From ffe211279556f34a1a555173bc0fe8ff53244be2 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Wed, 20 Nov 2024 01:55:27 +1100 Subject: [PATCH] Move "no name changes" from compression to checksum table Compression names actually aren't used in dedup table names, but checksum names are. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Reviewed-by: George Melikov Signed-off-by: Rob Norris Closes #16776 --- module/zfs/zio_checksum.c | 6 ++++++ module/zfs/zio_compress.c | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/module/zfs/zio_checksum.c b/module/zfs/zio_checksum.c index ce6772a40..0d2fda8d5 100644 --- a/module/zfs/zio_checksum.c +++ b/module/zfs/zio_checksum.c @@ -160,6 +160,12 @@ abd_fletcher_4_byteswap(abd_t *abd, uint64_t size, abd_fletcher_4_impl(abd, size, &acd); } +/* + * Checksum vectors. + * + * Note: you cannot change the name string for these functions, as they are + * embedded in on-disk data in some places (eg dedup table names). + */ zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = { {{NULL, NULL}, NULL, NULL, 0, "inherit"}, {{NULL, NULL}, NULL, NULL, 0, "on"}, diff --git a/module/zfs/zio_compress.c b/module/zfs/zio_compress.c index 10c482573..1a0178eb2 100644 --- a/module/zfs/zio_compress.c +++ b/module/zfs/zio_compress.c @@ -44,10 +44,6 @@ static unsigned long zio_decompress_fail_fraction = 0; /* * Compression vectors. - * - * NOTE: DO NOT CHANGE THE NAMES OF THESE COMPRESSION FUNCTIONS. - * THEY ARE USED AS ZAP KEY NAMES BY FAST DEDUP AND THEREFORE - * PART OF THE ON-DISK FORMAT. */ zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS] = { {"inherit", 0, NULL, NULL, NULL}, -- 2.11.4.GIT