Skip to content

Commit

Permalink
ddt: reduce DDT_NAMELEN
Browse files Browse the repository at this point in the history
This is the buffer size passed to ddt_object_name(), to expand the
DMU_POOL_DDT format. That format inserts the table checksum, class and
type names, which as I write this are max 6, 9 and 3, respectively.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/
Closes openzfs#15908
  • Loading branch information
robn authored and behlendorf committed Feb 26, 2024
1 parent c00c085 commit 8f2f6cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/sys/ddt_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ extern void ddt_stat_update(ddt_t *ddt, ddt_entry_t *dde, uint64_t neg);
* outside of the DDT implementation proper, and if you do, consider moving
* them up.
*/
#define DDT_NAMELEN 110

/*
* Enough room to expand DMU_POOL_DDT format for all possible DDT
* checksum/class/type combinations.
*/
#define DDT_NAMELEN 32

extern uint64_t ddt_phys_total_refcnt(const ddt_entry_t *dde);

Expand Down

0 comments on commit 8f2f6cd

Please sign in to comment.