~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to include/grub/raid.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-02-08 11:39:26 UTC
  • mfrom: (17.6.26 experimental)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 104.
  • Revision ID: james.westby@ubuntu.com-20110208113926-clfs90haboyk9zip
Tags: 1.99~rc1-2
* Merge 1.98+20100804-13 and 1.98+20100804-14, updating translations:
  - Kazakh (Baurzhan Muftakhidinov / Timur Birsh).
* mkconfig_skip_dmcrypt.patch: Refer to GRUB_PRELOAD_MODULES rather than
  suggesting people write a /etc/grub.d/01_modules script (thanks, Jordan
  Uggla).
* Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes
  grub-mkrelpath on btrfs subvolumes (LP: #712029).
* Add rootflags=subvol=<name> if / is on a btrfs subvolume (LP: #712029).
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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. */
54
 
  grub_disk_addr_t start_sector[GRUB_RAID_MAX_DEVICES];
55
 
                           /* Start of each device, in 512 byte sectors. */
 
58
  unsigned int allocated_devs;
 
59
  struct grub_raid_member *members;
56
60
  struct grub_raid_array *next;
 
61
 
 
62
#ifdef GRUB_UTIL
 
63
  struct grub_raid *driver;
 
64
#endif
57
65
};
58
66
 
59
67
struct grub_raid