[PATCH blivet/rhel7-branch] Add --name= to ksdata for btrfs subvols, where we can.
Brian C. Lane
bcl at redhat.com
Thu Oct 2 00:28:41 UTC 2014
On Wed, Oct 01, 2014 at 11:55:58AM -0400, Chris Lumens wrote:
> This only works for volumes created by anaconda. Pre-existing volumes may
> have been created without a label, which means we don't have any definite
> way of grabbing the parent of the subvol. In those cases, we'll log it
> so the traceback will at least have some sign of what went wrong.
>
> Resolves: rhbz#1072060
> ---
> blivet/devices.py | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/blivet/devices.py b/blivet/devices.py
> index 6dd07e2..9357a8c 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -4627,3 +4627,8 @@ class BTRFSSubVolumeDevice(BTRFSDevice):
> data.subvol = True
> data.name = self.name
> data.preexist = self.exists
> +
> + if self.volume.format.label:
> + data.devices = [self.volume.format.label]
> + else:
> + log.warning("btrfs volume has no label; ksdata will be incomplete")
> --
> 1.9.3
ack
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list