Lazy LVM and RAID assembly
This commit is contained in:
parent
9b710a888e
commit
24b905a11c
13 changed files with 365 additions and 114 deletions
|
@ -50,6 +50,15 @@ struct grub_disk;
|
|||
struct grub_disk_memberlist;
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GRUB_DISK_PULL_NONE,
|
||||
GRUB_DISK_PULL_REMOVABLE,
|
||||
GRUB_DISK_PULL_RESCAN,
|
||||
GRUB_DISK_PULL_RESCAN_UNTYPED,
|
||||
GRUB_DISK_PULL_MAX
|
||||
} grub_disk_pull_t;
|
||||
|
||||
/* Disk device. */
|
||||
struct grub_disk_dev
|
||||
{
|
||||
|
@ -60,10 +69,12 @@ struct grub_disk_dev
|
|||
enum grub_disk_dev_id id;
|
||||
|
||||
/* Call HOOK with each device name, until HOOK returns non-zero. */
|
||||
int (*iterate) (int (*hook) (const char *name));
|
||||
int (*iterate) (int (*hook) (const char *name),
|
||||
grub_disk_pull_t pull);
|
||||
|
||||
/* Open the device named NAME, and set up DISK. */
|
||||
grub_err_t (*open) (const char *name, struct grub_disk *disk);
|
||||
grub_err_t (*open) (const char *name, struct grub_disk *disk,
|
||||
grub_disk_pull_t pull);
|
||||
|
||||
/* Close the disk DISK. */
|
||||
void (*close) (struct grub_disk *disk);
|
||||
|
|
|
@ -42,6 +42,7 @@ struct grub_raid_array
|
|||
int number; /* The device number, taken from md_minor so we
|
||||
are consistent with the device name in
|
||||
Linux. */
|
||||
int became_readable_at;
|
||||
int level; /* RAID levels, only 0, 1 or 5 at the moment. */
|
||||
int layout; /* Layout for RAID 5/6. */
|
||||
unsigned int total_devs; /* Total number of devices in the array. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue