]> git.proxmox.com Git - mirror_zfs-debian.git/blame - include/sys/vdev_raidz.h
New upstream version 0.7.2
[mirror_zfs-debian.git] / include / sys / vdev_raidz.h
CommitLineData
cae5b340
AX
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (C) 2016 Gvozden Neskovic <neskovic@compeng.uni-frankfurt.de>.
23 */
24
25#ifndef _SYS_VDEV_RAIDZ_H
26#define _SYS_VDEV_RAIDZ_H
27
28#include <sys/types.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34struct zio;
35struct raidz_map;
36#if !defined(_KERNEL)
37struct kernel_param {};
38#endif
39
40/*
41 * vdev_raidz interface
42 */
43struct raidz_map *vdev_raidz_map_alloc(struct zio *, uint64_t, uint64_t,
44 uint64_t);
45void vdev_raidz_map_free(struct raidz_map *);
46void vdev_raidz_generate_parity(struct raidz_map *);
47int vdev_raidz_reconstruct(struct raidz_map *, const int *, int);
48
49/*
50 * vdev_raidz_math interface
51 */
52void vdev_raidz_math_init(void);
53void vdev_raidz_math_fini(void);
54struct raidz_impl_ops *vdev_raidz_math_get_ops(void);
55int vdev_raidz_math_generate(struct raidz_map *);
56int vdev_raidz_math_reconstruct(struct raidz_map *, const int *, const int *,
57 const int);
58int vdev_raidz_impl_set(const char *);
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* _SYS_VDEV_RAIDZ_H */