In https://github.com/elastic/elasticsearch/pull/88639 we introduced a new setting that allows configuring a maximum headroom in disk watermarks that helps reducing the waste of disk space in large disks. The disk health indicator should take that new setting into account to avoid reporting issues when there's still room for new data in the cluster. 

https://github.com/elastic/elasticsearch/blob/6ec31ed1533e6aaf8fc6dabda5e419f5dce984fa/server/src/main/java/org/elasticsearch/health/metadata/HealthMetadata.java#L193-L199

Those calls should take into account the available max headroom.
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadata.java
}
    public static NamedDiff<ClusterState.Custom> readDiffFrom(StreamInput in) throws IOException {
        return readDiffFrom(ClusterState.Custom.class, TYPE, in);
    }
    @Override
    public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params ignored) {
        return Iterators.single((builder, params) -> {
            builder.startObject(DISK_METADATA.getPreferredName());
            diskMetadata.toXContent(builder, params);
            builder.endObject();
            return builder;
        });
    }
    public static HealthMetadata getFromClusterState(ClusterState clusterState) {
        return clusterState.custom(HealthMetadata.TYPE);
    }
    public Disk getDiskMetadata() {
        return diskMetadata;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        HealthMetadata that = (HealthMetadata) o;
        return Objects.equals(diskMetadata, that.diskMetadata);
    }
    @Override
    public int hashCode() {
        return Objects.hash(diskMetadata);
    }