Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
mdadm.5365
0142-Detail-don-t-assume-a-particular-disk-numb...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0142-Detail-don-t-assume-a-particular-disk-number-of-miss.patch of Package mdadm.5365
From 78a5dc039b9344762b8f7cde2d159b482993eb2d Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.com> Date: Fri, 18 Dec 2015 13:51:54 +1100 Subject: [PATCH 197/359] Detail: don't assume a particular 'disk' number of missing devices. References: bsc#1081910 When a particular raid-disk is missing, we don't know which disk number it should have, and reporting a number could result in duplicate numbers (with v1.x metadata - never with the old 0.90). So set the default to -1 and recoginise that when printing. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Coly Li <colyli@suse.de> --- Detail.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Detail.c b/Detail.c index cbf1f9a..ef2aabd 100644 --- a/Detail.c +++ b/Detail.c @@ -299,7 +299,8 @@ int Detail(char *dev, struct context *c) for (d = 0; d < max_disks * 2; d++) { disks[d].state = (1<<MD_DISK_REMOVED); disks[d].major = disks[d].minor = 0; - disks[d].number = disks[d].raid_disk = d/2; + disks[d].number = -1; + disks[d].raid_disk = d/2; } next = array.raid_disks*2; @@ -622,6 +623,9 @@ This is pretty boring else if (disk.raid_disk < 0) printf(" %5d %5d %5d - ", disk.number, disk.major, disk.minor); + else if (disk.number < 0) + printf(" - %5d %5d %5d ", + disk.major, disk.minor, disk.raid_disk); else printf(" %5d %5d %5d %5d ", disk.number, disk.major, disk.minor, disk.raid_disk); -- 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