Lines Matching refs:partition

69 	BPartition*	partition;
79 : partition(NULL),
90 BPartition* partition;
137 // associated shadow partition, i.e. those that shall be deleted.
138 // 2) Generate uninitialize jobs for all partition whose initialization
190 DiskDeviceJobGenerator::_GenerateCleanupJobs(BPartition* partition)
193 // all descendants of a partition to be uninitialized or removed.
194 if (BMutablePartition* shadow = _GetMutablePartition(partition)) {
196 && partition->fPartitionData->content_type) {
197 // partition changes initialization
198 status_t error = _GenerateUninitializeJob(partition);
203 for (int32 i = 0; BPartition* child = partition->_ChildAt(i); i++) {
209 } else if (BPartition* parent = partition->Parent()) {
211 status_t error = _GenerateDeleteChildJob(parent, partition);
221 DiskDeviceJobGenerator::_GeneratePlacementJobs(BPartition* partition)
223 if (BMutablePartition* shadow = _GetMutablePartition(partition)) {
227 && (shadow->Size() != partition->Size()
228 || shadow->Offset() != partition->Offset())) {
232 if (shadow->Size() > partition->Size()) {
234 status_t error = _GenerateResizeJob(partition);
240 status_t error = _GenerateChildPlacementJobs(partition);
244 if (shadow->Size() < partition->Size()) {
246 status_t error = _GenerateResizeJob(partition);
258 DiskDeviceJobGenerator::_GenerateChildPlacementJobs(BPartition* partition)
260 BMutablePartition* shadow = _GetMutablePartition(partition);
262 // nothing to do, if the partition contains no partitioning system or
274 for (int32 i = 0; BPartition* child = partition->_ChildAt(i); i++) {
279 info.partition = child;
316 // check OK -- the partition wouldn't be moved before
318 status_t error = _GenerateMoveJob(info.partition);
335 // check OK -- the partition wouldn't be moved before
337 status_t error = _GenerateMoveJob(info.partition);
348 // terminate, if no partition could be moved
355 for (int32 i = 0; BPartition* child = partition->_ChildAt(i); i++) {
372 BPartition* partition)
374 user_partition_data* partitionData = partition->fPartitionData;
377 = partition->fDelegate->MutablePartition()->ChangeFlags();
379 // create the partition, if not existing yet
384 status_t error = _GenerateCreateChildJob(parent, partition);
388 // partition already exists: set non-content properties
392 || compare_string(partition->Name(), partitionData->name)) {
396 status_t error = _GenerateSetNameJob(parent, partition);
403 || compare_string(partition->Type(), partitionData->type)) {
407 status_t error = _GenerateSetTypeJob(parent, partition);
413 if ((partition->Parameters() != NULL)
415 || compare_string(partition->Parameters(),
420 status_t error = _GenerateSetParametersJob(parent, partition);
426 if (partition->ContentType()) {
427 // initialize the partition, if required
429 status_t error = _GenerateInitializeJob(partition);
433 // partition not (re-)initialized, set content properties
437 || compare_string(partition->RawContentName(),
439 status_t error = _GenerateSetContentNameJob(partition);
445 if ((partition->ContentParameters() != NULL)
447 || compare_string(partition->ContentParameters(),
449 status_t error = _GenerateSetContentParametersJob(partition);
456 status_t error = _GenerateDefragmentJob(partition);
465 status_t error = _GenerateRepairJob(partition, repair);
473 for (int32 i = 0; BPartition* child = partition->ChildAt(i); i++) {
474 status_t error = _GenerateRemainingJobs(partition, child);
485 DiskDeviceJobGenerator::_GetMutablePartition(BPartition* partition)
487 if (!partition)
490 return partition->fDelegate
491 ? partition->fDelegate->MutablePartition() : NULL;
497 DiskDeviceJobGenerator::_GenerateInitializeJob(BPartition* partition)
500 status_t error = _GetPartitionReference(partition, reference);
508 error = job->Init(partition->ContentType(),
509 partition->RawContentName(), partition->ContentParameters());
521 DiskDeviceJobGenerator::_GenerateUninitializeJob(BPartition* partition)
524 status_t error = _GetPartitionReference(partition, reference);
528 BPartition* parent = partition->Parent();
542 DiskDeviceJobGenerator::_GenerateSetContentNameJob(BPartition* partition)
545 status_t error = _GetPartitionReference(partition, reference);
553 error = job->Init(partition->RawContentName(),
566 DiskDeviceJobGenerator::_GenerateSetContentParametersJob(BPartition* partition)
569 status_t error = _GetPartitionReference(partition, reference);
577 error = job->Init(partition->ContentParameters(),
590 DiskDeviceJobGenerator::_GenerateDefragmentJob(BPartition* partition)
593 status_t error = _GetPartitionReference(partition, reference);
603 DiskDeviceJobGenerator::_GenerateRepairJob(BPartition* partition, bool repair)
606 status_t error = _GetPartitionReference(partition, reference);
617 BPartition* partition)
625 error = _GetPartitionReference(partition, reference);
634 error = job->Init(partition->Offset(), partition->Size(), partition->Type(),
635 partition->Name(), partition->Parameters());
648 BPartition* partition)
656 error = _GetPartitionReference(partition, reference);
666 DiskDeviceJobGenerator::_GenerateResizeJob(BPartition* partition)
668 BPartition* parent = partition->Parent();
678 error = _GetPartitionReference(partition, reference);
683 partition->Size(), partition->ContentSize()));
689 DiskDeviceJobGenerator::_GenerateMoveJob(BPartition* partition)
691 BPartition* parent = partition->Parent();
701 error = _GetPartitionReference(partition, reference);
707 error = _CollectContentsToMove(partition);
716 error = job->Init(partition->Offset(), fContentsToMove,
730 BPartition* partition)
738 error = _GetPartitionReference(partition, reference);
746 error = job->Init(partition->Name(), B_DISK_DEVICE_JOB_SET_NAME);
759 BPartition* partition)
767 error = _GetPartitionReference(partition, reference);
775 error = job->Init(partition->Type(), B_DISK_DEVICE_JOB_SET_TYPE);
788 BPartition* partition)
796 error = _GetPartitionReference(partition, reference);
804 error = job->Init(partition->Parameters(),
817 DiskDeviceJobGenerator::_CollectContentsToMove(BPartition* partition)
819 BMutablePartition* shadow = _GetMutablePartition(partition);
823 // if the partition has contents, push its ID
826 status_t error = _PushContentsToMove(partition);
832 for (int32 i = 0; BPartition* child = partition->ChildAt(i); i++) {
843 DiskDeviceJobGenerator::_PushContentsToMove(BPartition* partition)
849 status_t error = _GetPartitionReference(partition, reference);
861 DiskDeviceJobGenerator::_GetPartitionReference(BPartition* partition,
864 if (!partition)
870 if (info.partition == partition) {
875 if (info.partition == NULL) {
876 // create partition reference
881 // set partition ID and change counter
882 user_partition_data* partitionData = partition->fPartitionData;
888 info.partition = partition;