Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
mdadm.5365
0068-Grow-fix-problem-with-grow-continue.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0068-Grow-fix-problem-with-grow-continue.patch of Package mdadm.5365
From 8e7ddc5f50af00e569ef115e25c635e2d74e90f0 Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.de> Date: Thu, 28 May 2015 16:43:15 +1000 Subject: [PATCH] Grow: fix problem with --grow --continue References: bsc#1081910 If an array is being reshaped using backup space on a 'spare' device, then mdadm --grow --continue won't find it as by the time it runs, nothing looks like a spare are more. The spare has been added to the array, but has no data yet. So allow reshape_prepare_fdlist to find a newly-incorporated spare and report this so it can be used. Reported-by: Xiao Ni <xni@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Coly Li <colyli@suse.de> --- Grow.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Grow.c b/Grow.c index a20ff3e..85de1d2 100644 --- a/Grow.c +++ b/Grow.c @@ -850,7 +850,8 @@ int reshape_prepare_fdlist(char *devname, for (sd = sra->devs; sd; sd = sd->next) { if (sd->disk.state & (1<<MD_DISK_FAULTY)) continue; - if (sd->disk.state & (1<<MD_DISK_SYNC)) { + if (sd->disk.state & (1<<MD_DISK_SYNC) && + sd->disk.raid_disk < raid_disks) { char *dn = map_dev(sd->disk.major, sd->disk.minor, 1); fdlist[sd->disk.raid_disk] @@ -3184,7 +3185,7 @@ started: d = reshape_prepare_fdlist(devname, sra, odisks, nrdisks, blocks, backup_file, fdlist, offsets); - if (d < 0) { + if (d < odisks) { goto release; } if ((st->ss->manage_reshape == NULL) || @@ -3196,7 +3197,7 @@ started: devname); pr_err(" Please provide one with \"--backup=...\"\n"); goto release; - } else if (sra->array.spare_disks == 0) { + } else if (d == odisks) { pr_err("%s: Cannot grow - need a spare or backup-file to backup critical section\n", devname); goto release; } -- 2.16.1
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