From 33ef8b95b93e9822ff28d743fd11948eb8992a37 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 23 2015 09:04:14 +0000 Subject: import mdadm-3.3.2-2.el7_1.1 --- diff --git a/SOURCES/mdadm-3.3.2-IMSM-Clear-migration-record-on-disks-more-often.patch b/SOURCES/mdadm-3.3.2-IMSM-Clear-migration-record-on-disks-more-often.patch new file mode 100644 index 0000000..de9773f --- /dev/null +++ b/SOURCES/mdadm-3.3.2-IMSM-Clear-migration-record-on-disks-more-often.patch @@ -0,0 +1,64 @@ +From 71e5411eeaf7e97a67dfed20ea8c365e28c7481c Mon Sep 17 00:00:00 2001 +From: Pawel Baldysiak +Date: Tue, 20 Jan 2015 13:52:25 +0100 +Subject: [PATCH] IMSM: Clear migration record on disks more often + +Migration record is not always cleared after successful migration. This can +block another reshape from being started. Migration will not be continued via +systemd service due to error in verifying reshape position. This patch added +clearing migration record when disk is added to container, and after successful +migration. + +Signed-off-by: Pawel Baldysiak +Signed-off-by: NeilBrown +--- + super-intel.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/super-intel.c b/super-intel.c +index 4c53019..4b23b9a 100644 +--- a/super-intel.c ++++ b/super-intel.c +@@ -5055,6 +5055,14 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk, + } + + get_dev_size(fd, NULL, &size); ++ /* clear migr_rec when adding disk to container */ ++ memset(super->migr_rec_buf, 0, MIGR_REC_BUF_SIZE); ++ if (lseek64(fd, size - MIGR_REC_POSITION, SEEK_SET) >= 0) { ++ if (write(fd, super->migr_rec_buf, ++ MIGR_REC_BUF_SIZE) != MIGR_REC_BUF_SIZE) ++ perror("Write migr_rec failed"); ++ } ++ + size /= 512; + serialcpy(dd->disk.serial, dd->serial); + set_total_blocks(&dd->disk, size); +@@ -10648,6 +10656,24 @@ static int imsm_manage_reshape( + + } + ++ /* clear migr_rec on disks after successful migration */ ++ struct dl *d; ++ ++ memset(super->migr_rec_buf, 0, MIGR_REC_BUF_SIZE); ++ for (d = super->disks; d; d = d->next) { ++ if (d->index < 0 || is_failed(&d->disk)) ++ continue; ++ unsigned long long dsize; ++ ++ get_dev_size(d->fd, NULL, &dsize); ++ if (lseek64(d->fd, dsize - MIGR_REC_POSITION, ++ SEEK_SET) >= 0) { ++ if (write(d->fd, super->migr_rec_buf, ++ MIGR_REC_BUF_SIZE) != MIGR_REC_BUF_SIZE) ++ perror("Write migr_rec failed"); ++ } ++ } ++ + /* return '1' if done */ + ret_val = 1; + abort: +-- +2.1.0 + diff --git a/SPECS/mdadm.spec b/SPECS/mdadm.spec index bf19f8a..f9f5146 100644 --- a/SPECS/mdadm.spec +++ b/SPECS/mdadm.spec @@ -1,7 +1,7 @@ Summary: The mdadm program controls Linux md devices (software RAID arrays) Name: mdadm Version: 3.3.2 -Release: 2%{?dist} +Release: 2%{?dist}.1 Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz Source1: mdmonitor.init Source2: raid-check @@ -11,6 +11,7 @@ Source5: mdadm-cron Source6: mdmonitor.service Source7: mdadm.conf Source8: mdadm_event.conf +Patch1: mdadm-3.3.2-IMSM-Clear-migration-record-on-disks-more-often.patch # RHEL customization patches Patch96: mdadm-3.3.2-skip-rules.patch Patch97: mdadm-3.3-udev.patch @@ -38,6 +39,8 @@ file can be used to help with some common tasks. %prep %setup -q +%patch1 -p1 -b .migration + # RHEL customization patches %patch96 -p1 -b .rules %patch97 -p1 -b .udev @@ -103,6 +106,12 @@ rm -rf %{buildroot} /etc/libreport/events.d/* %changelog +* Tue Mar 24 2015 Jes Sorensen - 3.3.2-2.1 +- Z-Stream fix +- Fix issue where migration record was not always cleared after successful + reshape. +- Resolves rhbz#1205325 + * Mon Jan 19 2015 Jes Sorensen - 3.3.2-2 - Do not install 64-md-raid-assembly.rules - Resolves rhbz#1181620