Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
mdadm.5365
0064-Grow-retry-when-writing-reshape-to-sync_ac...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0064-Grow-retry-when-writing-reshape-to-sync_action-is-EB.patch of Package mdadm.5365
From ada38ebbcb9b28c4f865e77c736a7a467d0fb967 Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.de> Date: Thu, 14 May 2015 14:50:42 +1000 Subject: [PATCH 088/359] Grow: retry when writing 'reshape' to 'sync_action' is EBUSY. References: bsc#1081910 EBUSY can be returned if something has recently happened to cause md to want to check if recovery is needed, but hasn't had a chance yet. This can easily happen in testing. So retry a few times in that case. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Coly Li <colyli@suse.de> --- Grow.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Grow.c b/Grow.c index 99f3497..fe42b2b 100644 --- a/Grow.c +++ b/Grow.c @@ -718,9 +718,14 @@ int start_reshape(struct mdinfo *sra, int already_running, if (!already_running) sysfs_set_num(sra, NULL, "sync_min", sync_max_to_set); err = err ?: sysfs_set_num(sra, NULL, "sync_max", sync_max_to_set); - if (!already_running) - err = err ?: sysfs_set_str(sra, NULL, "sync_action", "reshape"); - + if (!already_running && err == 0) { + int cnt = 5; + do { + err = sysfs_set_str(sra, NULL, "sync_action", "reshape"); + if (err) + sleep(1); + } while (err && errno == EBUSY && cnt-- > 0); + } return err; } -- 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