Skip to content

Commit

Permalink
Move "no name changes" from compression to checksum table
Browse files Browse the repository at this point in the history
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 <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes openzfs#16776
  • Loading branch information
robn authored Nov 19, 2024
1 parent e08e832 commit ffe2112
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions module/zfs/zio_checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
4 changes: 0 additions & 4 deletions module/zfs/zio_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit ffe2112

Please sign in to comment.