grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] Install to LVM PVs
Date: Sun, 8 May 2016 11:47:20 +0300	[thread overview]
Message-ID: <572EFD18.5070009@gmail.com> (raw)
In-Reply-To: <572ED720.30800@gmail.com>

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	other threads:[~2016-05-08  8:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08  4:53 [PATCH] Install to LVM PVs Dryden Personalis
2016-05-08  6:05 ` Andrei Borzenkov
2016-05-08  8:47   ` Andrei Borzenkov [this message]
2016-05-08 13:10     ` Dryden Personalis
2016-05-08 17:16     ` Dryden Personalis
2016-05-08 17:40       ` Dryden Personalis
2016-05-08 13:01   ` Dryden Personalis
2016-05-09  6:07     ` Andrei Borzenkov
2016-05-09  8:41       ` Dryden Personalis
2016-05-09 16:10       ` Dryden Personalis
2016-05-09 16:18         ` Dryden Personalis
2016-05-09 17:56           ` Dryden Personalis
2016-05-17 18:01       ` Dryden Personalis
2016-05-08  9:23 ` Andrei Borzenkov
2016-05-08 13:09   ` Dryden Personalis
2016-05-09  0:10   ` Xen
2016-05-09  0:10     ` Dryden Personalis
  -- strict thread matches above, loose matches on Subject: below --
2013-09-25 12:39 Gabriel de Perthuis
2013-09-26  8:53 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-27 10:39   ` Gabriel de Perthuis
2013-09-27 12:48     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-27 13:56       ` Gabriel de Perthuis
2013-09-27 14:27       ` Andrey Borzenkov
2015-02-15 10:47       ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=572EFD18.5070009@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).