/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ /* md_u.h : user <=> kernel API between Linux raidtools and RAID drivers Copyright (C) 1998 Ingo Molnar
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
*/
#ifndef _UAPI_MD_U_H #define _UAPI_MD_U_H
/* * Different major versions are not compatible. * Different minor versions are only downward compatible. * Different patchlevel versions are downward and upward compatible.
*/ #define MD_MAJOR_VERSION 0 #define MD_MINOR_VERSION 90 /* * MD_PATCHLEVEL_VERSION indicates kernel functionality. * >=1 means different superblock formats are selectable using SET_ARRAY_INFO * and major_version/minor_version accordingly * >=2 means that Internal bitmaps are supported by setting MD_SB_BITMAP_PRESENT * in the super status byte * >=3 means that bitmap superblock version 4 is supported, which uses * little-ending representation rather than host-endian
*/ #define MD_PATCHLEVEL_VERSION 3
/* 63 partitions with the alternate major number (mdp) */ #define MdpMinorShift 6
typedefstruct mdu_version_s { int major; int minor; int patchlevel;
} mdu_version_t;
typedefstruct mdu_array_info_s { /* * Generic constant information
*/ int major_version; int minor_version; int patch_version; unsignedint ctime; int level; int size; int nr_disks; int raid_disks; int md_minor; int not_persistent;
/* * Generic state information
*/ unsignedint utime; /* 0 Superblock update time */ int state; /* 1 State bits (clean, ...) */ int active_disks; /* 2 Number of currently active disks */ int working_disks; /* 3 Number of working disks */ int failed_disks; /* 4 Number of failed disks */ int spare_disks; /* 5 Number of spare disks */
/* * Personality information
*/ int layout; /* 0 the array's physical layout */ int chunk_size; /* 1 chunk size in bytes */
} mdu_array_info_t;
#define LEVEL_LINEAR (-1)
/* we need a value for 'no level specified' and 0 * means 'raid0', so we need something else. This is * for internal use only
*/ #define LEVEL_NONE (-1000000)
typedefstruct mdu_disk_info_s { /* * configuration/status of one particular disk
*/ int number; int major; int minor; int raid_disk; int state;
} mdu_disk_info_t;
typedefstruct mdu_start_info_s { /* * configuration/status of one particular disk
*/ int major; int minor; int raid_disk; int state;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.