grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Install to LVM PVs


From: Andrei Borzenkov
Subject: Re: [PATCH] Install to LVM PVs
Date: Sun, 8 May 2016 11:47:20 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

08.05.2016 09:05, Andrei Borzenkov пишет:
>>  
>> +#ifdef GRUB_UTIL
>> +int
>> +grub_util_is_lvm(grub_disk_t disk)
>> +{
>> +  struct grub_diskfilter_pv_id id;
>> +  struct grub_diskfilter_vg *vg;
>> +  grub_disk_addr_t start_sector;
>> +  vg = grub_lvm_detect(disk, &id, &start_sector);
>> +  if (! vg)
>> +    return 0;
>> +  /* don't free the vg, it's held by grub_diskfilter_vg_register */
>> +  grub_free(id.uuid);
>> +  return 1;
>> +}
>> +
> 
> This has side effect of adding duplicate VG definitions; this may later
> confuse grub. What about just checking array->driver for LVM? Go through
> registered arrays, find disk match and check array driver. See
> scan_disk_partition_iter () for example.
> 

Which is basically call grub_diskfilter_get_pv_from_disk() and check
vg_out->driver.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]