Merge mainline into arm
This commit is contained in:
commit
ae27e4d323
111 changed files with 5383 additions and 3002 deletions
|
@ -219,6 +219,8 @@ scan_devices (const char *arname)
|
|||
grub_disk_pull_t pull;
|
||||
struct grub_diskfilter_vg *vg;
|
||||
struct grub_diskfilter_lv *lv = NULL;
|
||||
int scan_depth;
|
||||
int need_rescan;
|
||||
|
||||
for (pull = 0; pull < GRUB_DISK_PULL_MAX; pull++)
|
||||
for (p = grub_disk_dev_list; p; p = p->next)
|
||||
|
@ -231,16 +233,26 @@ scan_devices (const char *arname)
|
|||
return;
|
||||
}
|
||||
|
||||
for (vg = array_list; vg; vg = vg->next)
|
||||
scan_depth = 0;
|
||||
need_rescan = 1;
|
||||
while (need_rescan && scan_depth++ < 100)
|
||||
{
|
||||
if (vg->lvs)
|
||||
for (lv = vg->lvs; lv; lv = lv->next)
|
||||
if (!lv->scanned && lv->fullname && lv->became_readable_at)
|
||||
{
|
||||
scan_disk (lv->fullname, 1);
|
||||
lv->scanned = 1;
|
||||
}
|
||||
need_rescan = 0;
|
||||
for (vg = array_list; vg; vg = vg->next)
|
||||
{
|
||||
if (vg->lvs)
|
||||
for (lv = vg->lvs; lv; lv = lv->next)
|
||||
if (!lv->scanned && lv->fullname && lv->became_readable_at)
|
||||
{
|
||||
scan_disk (lv->fullname, 1);
|
||||
lv->scanned = 1;
|
||||
need_rescan = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (need_rescan)
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "DISKFILTER scan depth exceeded");
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1045,10 +1057,14 @@ insert_array (grub_disk_t disk, const struct grub_diskfilter_pv_id *id,
|
|||
{
|
||||
struct grub_diskfilter_pv *pv;
|
||||
|
||||
grub_dprintf ("diskfilter", "Inserting %s into %s (%s)\n", disk->name,
|
||||
grub_dprintf ("diskfilter", "Inserting %s (+%lld,%lld) into %s (%s)\n", disk->name,
|
||||
(unsigned long long) grub_partition_get_start (disk->partition),
|
||||
(unsigned long long) grub_disk_get_size (disk),
|
||||
array->name, diskfilter->name);
|
||||
#ifdef GRUB_UTIL
|
||||
grub_util_info ("Inserting %s into %s (%s)\n", disk->name,
|
||||
grub_util_info ("Inserting %s (+%lld,%lld) into %s (%s)\n", disk->name,
|
||||
(unsigned long long) grub_partition_get_start (disk->partition),
|
||||
(unsigned long long) grub_disk_get_size (disk),
|
||||
array->name, diskfilter->name);
|
||||
array->driver = diskfilter;
|
||||
#endif
|
||||
|
@ -1092,14 +1108,7 @@ insert_array (grub_disk_t disk, const struct grub_diskfilter_pv_id *id,
|
|||
/* Add the device to the array. */
|
||||
for (lv = array->lvs; lv; lv = lv->next)
|
||||
if (!lv->became_readable_at && lv->fullname && is_lv_readable (lv, 0))
|
||||
{
|
||||
lv->became_readable_at = ++inscnt;
|
||||
if (is_lv_readable (lv, 1))
|
||||
{
|
||||
scan_disk (lv->fullname, 1);
|
||||
lv->scanned = 1;
|
||||
}
|
||||
}
|
||||
lv->became_readable_at = ++inscnt;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue