/* mdraid_linux.c - module to handle Linux Software RAID. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008,2009,2010 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
/* Linux RAID on disk structures and constants,
GRUB_MOD_LICENSE ("GPLv3+");
/*
* The following are counted in 32-bit words
*/
#define SB_GENERIC_OFFSET 0
- SB_GENERIC_WORDS \
- SB_DISKS_WORDS \
/*
* Device "operational" state bits
*/
#define DISK_FAULTY 0
/*
* Superblock state bits
*/
#define SB_CLEAN 0
struct grub_raid_disk_09
{
};
struct grub_raid_super_09
{
/*
* Constant generic information
*/
/*
* Generic state information
*/
/*
* Personality information
*/
/*
* Disks information
*/
/*
* Reserved
*/
/*
* Active descriptor
*/
} __attribute__ ((packed));
static grub_err_t
{
/* The sector where the mdraid 0.90 superblock is stored, if available. */
if (size == GRUB_DISK_SIZE_UNKNOWN)
return grub_errno;
/* Look whether there is a mdraid 0.90 superblock. */
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"unsupported RAID version: %d.%d",
/* FIXME: Check the checksum. */
/* Multipath. */
if ((int) level == -4)
level = 1;
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"unsupported RAID level: %d", level);
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"spares aren't implemented");
return grub_errno;
*start_sector = 0;
return 0;
}
.name = "mdraid09",
.next = 0
};
{
}
{
}