[PATCH 5/5] Only gather lvm information one time per DeviceTree.populate call.

Anne Mulhern amulhern at redhat.com
Mon Mar 31 15:15:46 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Friday, March 28, 2014 5:02:28 PM
> Subject: Re: [PATCH 5/5] Only gather lvm information one time per	DeviceTree.populate call.
> 
> This requires a followup patch:
> 
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index ca5d498..ab091f5 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -1317,7 +1317,8 @@ class DeviceTree(object):
>          if flags.installer_mode:
>              lv_info = devicelibs.lvm.lvs(vg_name)
>          else:
> -            lv_info = self.lvInfo
> +            lv_info = dict((k, v) for (k, v) in self.lvInfo.iteritems()
> +                            if udev_device_get_vg_name(v) == vg_name)
>  
>          self.names.extend(n for n in lv_info.keys() if n not in
> self.names)
> 
> This filters the LV dict used by handleVgLVs so that it contains only
> LVs in the VG we're concerned with. I am adding this into patch 5 in my
> working tree.
> 
> David
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Why is it so desirable to cache this info? I worry that keeping around and handling
this state will prove troublesome in the long run.

- mulhern


More information about the anaconda-patches mailing list