[PATCH 4/5] When a partition request gets unallocated, set the name back to req#

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We call allocatePartitions() multiple times (from growPartitions for example),
and at the top we unalloc partitions, when reallocating them, the
numbering could change and allocatePartitions() may fail half way leaving
us with identical named devices. Reset the PartitionDevice name to req#
when unallocating the partition to fix this.
---
 storage/devices.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 6aa462c..70146df 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1029,7 +1029,7 @@ class PartitionDevice(StorageDevice):
 
         if partition is None:
             self._partedPartition = None
-            # no need to clobber our name
+            self._name = self.req_name
         else:
             self._partedPartition = partition
             self._name = devicePathToName(partition.getDeviceNodeName())
-- 
1.6.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux