~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to include/grub/raid.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* raid.h - On disk structures for RAID. */
2
2
/*
3
3
 *  GRUB  --  GRand Unified Bootloader
4
 
 *  Copyright (C) 2006,2007,2008  Free Software Foundation, Inc.
 
4
 *  Copyright (C) 2006,2007,2008,2010  Free Software Foundation, Inc.
5
5
 *
6
6
 *  GRUB is free software: you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
22
22
 
23
23
#include <grub/types.h>
24
24
 
25
 
#define GRUB_RAID_MAX_DEVICES   32
26
 
 
27
25
#define GRUB_RAID_LAYOUT_LEFT_ASYMMETRIC        0
28
26
#define GRUB_RAID_LAYOUT_RIGHT_ASYMMETRIC       1
29
27
#define GRUB_RAID_LAYOUT_LEFT_SYMMETRIC         2
32
30
#define GRUB_RAID_LAYOUT_RIGHT_MASK             1
33
31
#define GRUB_RAID_LAYOUT_SYMMETRIC_MASK         2
34
32
 
 
33
struct grub_raid_member
 
34
{
 
35
  grub_disk_t device;  /* Array of total_devs devices. */
 
36
  grub_disk_addr_t start_sector;
 
37
  /* Start of each device, in 512 byte sectors. */
 
38
};
 
39
 
35
40
struct grub_raid_array
36
41
{
37
42
  int number;              /* The device number, taken from md_minor so we
43
48
  grub_size_t chunk_size;  /* The size of a chunk, in 512 byte sectors. */
44
49
  grub_uint64_t disk_size; /* Size of an individual disk, in 512 byte
45
50
                              sectors. */
46
 
  int index;               /* Index of current device.  */
 
51
  unsigned int index;               /* Index of current device.  */
47
52
  int uuid_len;            /* The length of uuid.  */
48
53
  char *uuid;              /* The UUID of the device. */
49
54
 
50
55
  /* The following field is setup by the caller.  */
51
56
  char *name;              /* That will be "md<number>". */
52
57
  unsigned int nr_devs;    /* The number of devices we've found so far. */
53
 
  grub_disk_t device[GRUB_RAID_MAX_DEVICES];  /* Array of total_devs devices. */
 
58
  unsigned int allocated_devs;
 
59
  struct grub_raid_member *members;
54
60
  struct grub_raid_array *next;
 
61
 
 
62
#ifdef GRUB_UTIL
 
63
  struct grub_raid *driver;
 
64
#endif
55
65
};
56
66
 
57
67
struct grub_raid
58
68
{
59
69
  const char *name;
60
70
 
61
 
  grub_err_t (*detect) (grub_disk_t disk, struct grub_raid_array *array);
 
71
  grub_err_t (*detect) (grub_disk_t disk, struct grub_raid_array *array,
 
72
                        grub_disk_addr_t *start_sector);
62
73
 
63
74
  struct grub_raid *next;
64
75
};