[PATCH 2/9] Stop pretending btrfs subvols can have a size.
David Lehman
dlehman at redhat.com
Mon Aug 20 14:20:35 UTC 2012
---
pyanaconda/storage/__init__.py | 9 +--------
pyanaconda/storage/partitioning.py | 21 ---------------------
2 files changed, 1 insertions(+), 29 deletions(-)
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 7b80072..664b259 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -1180,6 +1180,7 @@ class Storage(object):
fmt_args["mountopts"] = "subvol=%s" % name
kwargs.pop("metaDataLevel", None)
kwargs.pop("dataLevel", None)
+ kwargs.pop("size", None)
else:
dev_class = BTRFSVolumeDevice
# set up the volume label, using hostname if necessary
@@ -3114,14 +3115,6 @@ class BTRFSFactory(DeviceFactory):
elif self.raid_level in ("raid1", "raid10"):
return self.size * len(self.disks)
- def container_size_func(self, container):
- if container.exists:
- size = container.size
- else:
- size = sum([s._size for s in container.subvolumes])
-
- return size
-
class LVMFactory(DeviceFactory):
type_desc = "lvm"
member_format = "lvmpv"
diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index 06654c7..968389e 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -300,8 +300,6 @@ def doAutoPartition(storage, data):
# grow LVs
growLVM(storage)
-
- growBTRFS(storage)
except PartitioningWarning as e:
log.warning(str(e))
if errorHandler.cb(e) == ERROR_RAISE:
@@ -1908,22 +1906,3 @@ def growLVM(storage):
# pesize-1. As a result, you can't just add the growth to the
# initial size.
req.device.size = chunk.lengthToSize(req.base + req.growth)
-
-def growBTRFS(storage):
- """ Set up relative sizes for subvolumes after autopart for custom ui. """
- for vol in storage.btrfsVolumes:
- if vol.exists:
- continue
-
- requests = []
- for subvol in vol.subvolumes:
- request = Request(subvol)
- request.base = subvol._size
- requests.append(request)
-
- chunk = Chunk(int(vol.size), requests=requests)
- chunk.path = "btrfs %s" % vol.name
- chunk.growRequests()
-
- for req in chunk.requests:
- req.device._size = chunk.lengthToSize(req.base + req.growth)
--
1.7.7.6
More information about the anaconda-patches
mailing list