Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
mdadm.1739
0001-IMSM-Clear-migration-record-on-disks-more-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-IMSM-Clear-migration-record-on-disks-more-often.patch of Package mdadm.1739
From 71e5411eeaf7e97a67dfed20ea8c365e28c7481c Mon Sep 17 00:00:00 2001 From: Pawel Baldysiak <pawel.baldysiak@intel.com> 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 <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> --- super-intel.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) --- a/super-intel.c +++ b/super-intel.c @@ -5055,6 +5055,14 @@ static int add_to_super_imsm(struct supe } 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); @@ -10532,6 +10540,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:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor