From e478dc86ede12e68eb5b2d926c9f6ff5b6aebc00 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 12 Sep 2005 07:12:07 +0000 Subject: [PATCH] Release 2-0 With little fix for -O2 compile Signed-off-by: Neil Brown --- ANNOUNCE-2.1 | 37 +++++++++++++++++++++++++++++++++++++ ReadMe.c | 2 +- mdadm.8 | 2 +- mdadm.spec | 2 +- super1.c | 16 +++++++++------- 5 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 ANNOUNCE-2.1 diff --git a/ANNOUNCE-2.1 b/ANNOUNCE-2.1 new file mode 100644 index 00000000..fd328e70 --- /dev/null +++ b/ANNOUNCE-2.1 @@ -0,0 +1,37 @@ +Subject: ANNOUNCE: mdadm 2.1 - A tool for managing Soft RAID under Linux + +I am pleased to announce the availability of + mdadm version 2.1 + +It is available at the usual places: + http://www.cse.unsw.edu.au/~neilb/source/mdadm/ +and + http://www.{countrycode}.kernel.org/pub/linux/utils/raid/mdadm/ + +mdadm is a tool for creating, managing and monitoring +device arrays using the "md" driver in Linux, also +known as Software RAID arrays. + +Release 2.1 fixes a few problems found after the release of 2.0. +If you are using raid10 or version-1 superblocks and upgrade is +recommended. + +Specifically: + - Fix assembling of raid10 array when devices are missing. + mdadm now correctly detects if a array is workable or not + depending on which devices are present, and so will correctly + handle "--assemble --force" if multiple devices have failed. + - Report raid10 layout in --examine output. + - Fix assembling of arrays that use the version-1 superblock and + have spares. Previously the spares would be ignored. + - Fix bug so that multiple drives can be re-added at once. + - Fix problem with hot-adding a bitmap to version-1-superblock + arrays. + + +Development of mdadm is sponsored by + SUSE Labs, Novell Inc. + +NeilBrown 12th September 2005 + + diff --git a/ReadMe.c b/ReadMe.c index 579de44b..cd69a1c6 100644 --- a/ReadMe.c +++ b/ReadMe.c @@ -29,7 +29,7 @@ #include "mdadm.h" -char Version[] = Name " - v2.0 - 25 August 2005\n"; +char Version[] = Name " - v2.1 - 12 September 2005\n"; /* * File: ReadMe.c diff --git a/mdadm.8 b/mdadm.8 index 780dbc81..aa39a236 100644 --- a/mdadm.8 +++ b/mdadm.8 @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.TH MDADM 8 "" v2.0m +.TH MDADM 8 "" v2.1 .SH NAME mdadm \- manage MD devices .I aka diff --git a/mdadm.spec b/mdadm.spec index 9224384b..32bd6d87 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,6 +1,6 @@ Summary: mdadm is used for controlling Linux md devices (aka RAID arrays) Name: mdadm -Version: 2.0 +Version: 2.1 Release: 1 Source: http://www.cse.unsw.edu.au/~neilb/source/mdadm/mdadm-%{version}.tgz URL: http://www.cse.unsw.edu.au/~neilb/source/mdadm/ diff --git a/super1.c b/super1.c index ccbddeca..4479dffb 100644 --- a/super1.c +++ b/super1.c @@ -535,7 +535,7 @@ static int write_init_super1(struct supertype *st, void *sbv, mdu_disk_info_t *dinfo, char *devname) { struct mdp_superblock_1 *sb = sbv; - struct mdp_superblock_1 *refsb = NULL; + void *refsbv = NULL; int fd = open(devname, O_RDWR | O_EXCL); int rfd; int rv; @@ -564,7 +564,9 @@ static int write_init_super1(struct supertype *st, void *sbv, if (rfd >= 0) close(rfd); sb->events = 0; - if (load_super1(st, fd, (void**)&refsb, NULL)==0) { + if (load_super1(st, fd, &refsbv, NULL)==0) { + struct mdp_superblock_1 *refsb = refsbv; + memcpy(sb->device_uuid, refsb->device_uuid, 16); if (memcmp(sb->set_uuid, refsb->set_uuid, 16)==0) { /* same array, so preserve events and dev_number */ @@ -897,12 +899,12 @@ void locate_bitmap1(struct supertype *st, int fd, void *sbv) unsigned long long offset; struct mdp_superblock_1 *sb; - if (sbv) - sb = sbv; - else { - if (st->ss->load_super(st, fd, (void**)&sb, NULL)) + if (!sbv) + if (st->ss->load_super(st, fd, sbv, NULL)) return; /* no error I hope... */ - } + + sb = sbv; + offset = __le64_to_cpu(sb->super_offset); offset += (long) __le32_to_cpu(sb->bitmap_offset); if (!sbv) -- 2.39.2