HomeFreeBSD

Improve allocation fallback handling

Description

Improve allocation fallback handling

Before this change in case of any allocation error ZFS always fallen
back to normal class. But with more of different classes available
we migth want more sophisticated logic. For example, it makes sense
to fall back from dedup first to special class (if it is allowed to
put DDT there) and only then to normal, since in a pool with dedup
and special classes populated normal class likely has performance
characteristics unsuitable for dedup.

This change implements general mechanism where fallback order is
controlled by the same spa_preferred_class() as the initial class
selection. And as first application it implements the mentioned
dedup->special->normal fallbacks. I have more plans for it later.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #17391

Details

Provenance
mavAuthored on May 31 2025, 11:12 PM
GitHub <noreply@github.com>Committed on May 31 2025, 11:12 PM
Parents
rGe0edfcbd4e73: ZVOL: Make zvol_volmode module parameter platform-independent
Branches
Unknown
Tags
Unknown