Lines Matching refs:partition_name
92 static bool UnmapPartitionOnDeviceMapper(const std::string& partition_name) {
93 auto state = DeviceMapper::Instance().GetState(partition_name);
98 return DestroyLogicalPartition(partition_name, kMapTimeout);
105 static bool MapPartitionOnDeviceMapper(const std::string& partition_name, std::string* path) {
106 auto state = DeviceMapper::Instance().GetState(partition_name);
108 return CreateLogicalPartition(GetSuperDevice(), 0 /* metadata slot */, partition_name,
113 return DeviceMapper::Instance().GetDmDevicePathByName(partition_name, path);
177 const auto& partition_name = params.arg(0);
181 auto partition = params.builder->FindPartition(partition_name);
183 LOG(ERROR) << "Failed to find partition " << partition_name
187 if (!UnmapPartitionOnDeviceMapper(partition_name)) {
188 LOG(ERROR) << "Cannot unmap " << partition_name << " before resizing.";
192 LOG(ERROR) << "Failed to resize partition " << partition_name << " to size " << *size << ".";
200 const auto& partition_name = params.arg(0);
202 if (!UnmapPartitionOnDeviceMapper(partition_name)) {
203 LOG(ERROR) << "Cannot unmap " << partition_name << " before removing.";
206 params.builder->RemovePartition(partition_name);
212 const auto& partition_name = params.arg(0);
215 if (params.builder->AddPartition(partition_name, group_name, LP_PARTITION_ATTR_READONLY) ==
217 LOG(ERROR) << "Failed to add partition " << partition_name << " to group " << group_name << ".";
225 const auto& partition_name = params.arg(0);
228 auto partition = params.builder->FindPartition(partition_name);
230 LOG(ERROR) << "Cannot move partition " << partition_name << " to group " << new_group
238 LOG(ERROR) << "Cannot move partition " << partition_name << " from group " << old_group
322 for (const auto& partition_name : partition_names) {
323 if (!UnmapPartitionOnDeviceMapper(partition_name)) {
324 LOG(ERROR) << "Cannot unmap " << partition_name << " before removing group " << group_name