Commit changes for disks during do_phase(). Regular disks don't have changes to save, but if we're replacing one disk with another disk, the replace object is also a disk. Without this, the replace plugin's commit routine would never get called and the replace would fail. Apply with: cd /usr/src/evms-2.4.0/ patch -p1 < commit.c.patch --- evms-2.4.0a/engine/commit.c 29 Sep 2004 16:22:19 -0000 +++ evms-2.4.0b/engine/commit.c 11 Oct 2004 14:15:59 -0000 @@ -753,6 +753,39 @@ /* + * Find any dirty disks and call their plug-ins to commit the changes + * to disk. + */ +static void commit_disks(commit_phase_t phase) { + + int rc = 0; + list_element_t iter; + storage_object_t * disk; + + LOG_PROC_ENTRY(); + + LIST_FOR_EACH(&disks_list, iter, disk) { + if ((disk->flags & SOFLAG_DIRTY) && + (disk->plugin != NULL) && + (disk->plugin->functions.plugin != NULL)) { + + status_message(_("Phase %d: Committing changes on disk %s...\n"), phase, disk->name); + rc = disk->plugin->functions.plugin->commit_changes(disk, phase); + + if ((rc != 0) && (rc != E_CANCELED)) { + engine_user_message(NULL, NULL, + _("Plug-in %s returned error %d when committing changes for disk %s during phase %d.\n"), + disk->plugin->short_name, rc, disk->name, phase); + set_commit_error(WARNING, rc); + } + } + } + + LOG_PROC_EXIT_VOID(); +} + + +/* * Find any dirty segments and call their plug-ins to commit the changes * to disk. */ @@ -2331,6 +2364,7 @@ static inline void do_phase(commit_phase_t phase) { + commit_disks(phase); commit_segments(phase); commit_containers(phase); commit_regions(phase);