linux/lib/raid6/algos.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- linux-c -*- ------------------------------------------------------- *
 *
 *   Copyright 2002 H. Peter Anvin - All Rights Reserved
 *
 * ----------------------------------------------------------------------- */

/*
 * raid6/algos.c
 *
 * Algorithm list and algorithm selection for RAID-6
 */

#include <linux/raid/pq.h>
#ifndef __KERNEL__
#include <sys/mman.h>
#include <stdio.h>
#else
#include <linux/module.h>
#include <linux/gfp.h>
/* In .bss so it's zeroed */
const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned));
EXPORT_SYMBOL();
#endif

struct raid6_calls raid6_call;
EXPORT_SYMBOL_GPL();

const struct raid6_calls * const raid6_algos[] =;

void (*raid6_2data_recov)(int, size_t, int, int, void **);
EXPORT_SYMBOL_GPL();

void (*raid6_datap_recov)(int, size_t, int, void **);
EXPORT_SYMBOL_GPL();

const struct raid6_recov_calls *const raid6_recov_algos[] =;

#ifdef __KERNEL__
#define RAID6_TIME_JIFFIES_LG2
#else
/* Need more time to be stable in userspace */
#define RAID6_TIME_JIFFIES_LG2
#define time_before
#endif

#define RAID6_TEST_DISKS
#define RAID6_TEST_DISKS_ORDER

static inline const struct raid6_recov_calls *raid6_choose_recov(void)
{}

static inline const struct raid6_calls *raid6_choose_gen(
	void *(*const dptrs)[RAID6_TEST_DISKS], const int disks)
{}


/* Try to pick the best algorithm */
/* This code uses the gfmul table as convenient data set to abuse */

int __init raid6_select_algo(void)
{}

static void raid6_exit(void)
{}

subsys_initcall(raid6_select_algo);
module_exit(raid6_exit);
MODULE_LICENSE();
MODULE_DESCRIPTION();