Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
mdadm.5365
0113-mdadm-make-cluster-raid-also-could-support...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0113-mdadm-make-cluster-raid-also-could-support-re-add.patch of Package mdadm.5365
From bff96f736696a75dab5311b15c0f77a24a177743 Mon Sep 17 00:00:00 2001 From: Guoqing Jiang <gqjiang@suse.com> Date: Thu, 20 Aug 2015 13:56:31 +0800 Subject: [PATCH 167/359] mdadm: make cluster raid also could support re-add References: bsc#1081910 If it is a cluster raid, the disc.state need to be changed accordingly when do re-add. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Coly Li <colyli@suse.de> --- Manage.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Manage.c b/Manage.c index 494cca9..b5450dd 100644 --- a/Manage.c +++ b/Manage.c @@ -669,6 +669,15 @@ int attempt_re_add(int fd, int tfd, struct mddev_dev *dv, disc.number = mdi.disk.number; disc.raid_disk = mdi.disk.raid_disk; disc.state = mdi.disk.state; + if (array->state & (1 << MD_SB_CLUSTERED)) { + /* extra flags are needed when adding to a cluster as + * there are two cases to distinguish + */ + if (dv->disposition == 'c') + disc.state |= (1 << MD_DISK_CANDIDATE); + else + disc.state |= (1 << MD_DISK_CLUSTER_ADD); + } if (dv->writemostly == 1) disc.state |= 1 << MD_DISK_WRITEMOSTLY; if (dv->writemostly == 2) -- 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