[PATCH 0/2] Allow adding btrfs subvolumes into devicetree outside Anaconda

Anne Mulhern amulhern at redhat.com
Mon Dec 8 16:40:53 UTC 2014





----- Original Message -----
> From: "Vojtech Trefny" <vtrefny at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Monday, December 8, 2014 9:24:48 AM
> Subject: [PATCH 0/2] Allow adding btrfs subvolumes into devicetree outside	Anaconda
> 
> Currently blivet is not recognizing btrfs subvolumes when not in installer
> mode. There are two prob
> lems:
> 1) devices.btrfs.listSubVolumes uses only originalFormat._mountpoint when
> looking for subvolumes bu
> t for existing btrfs volumes originalFormat._mounpoint is always None and
> mountpoint is stored in f
> ormat._mountpoint

Are you sure that's not the bug to fix? Why is originalFormat._mountpoint always
None for existing btrfs volumes?

Assuming that the originalFormat is the original format, and that format is the
planned format of the device, it seems weird to do a temporary mount at the
planned format's mountpoint, especially in the context in which this method
is called.

> 2) devicetree.populate (or devicetree.handleBTRFSFormat) skips devices with
> existing format -- e.g. already added into devicetree but without mountpoint
> (and without subvolumes):wq
> 
> Vojtech Trefny (2):
>   Use format.mountpoint for BTRFS listSubVolumes
>   Allow handling device format for already handled BTRFS
> 
>  blivet/devices/btrfs.py | 14 +++++++++-----
>  blivet/devicetree.py    |  8 +++++---
>  2 files changed, 14 insertions(+), 8 deletions(-)
> 
> --
> 2.1.0
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Stylistically,

a list like [None, "btrfs"]

can often be replaced with an equivalent tuple.

It's cheaper, and better if you don't actually need
any list methods.

- mulhern


More information about the anaconda-patches mailing list