summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2008-10-28 10:50:17 -0400
committerDoug Ledford <dledford@redhat.com>2008-10-28 10:50:17 -0400
commitc1f11bd8bbb8aa48ec3f22587fbf710f438ff954 (patch)
treefc713275c8532f4ac783cce3c4c7dbd02750951c
parent333bfd84a89dc14ec5f734f18441b28e2f5eb28d (diff)
parentc04bf2398e49763460c0e04df3130566ced16555 (diff)
downloadmdadm-c1f11bd8bbb8aa48ec3f22587fbf710f438ff954.tar.gz
mdadm-c1f11bd8bbb8aa48ec3f22587fbf710f438ff954.tar.xz
mdadm-c1f11bd8bbb8aa48ec3f22587fbf710f438ff954.zip
Merge commit 'mdadm-2.6.7.1' into fedora-devel
-rw-r--r--ANNOUNCE-2.6.7.127
-rw-r--r--Assemble.c2
-rw-r--r--Manage.c17
-rw-r--r--ReadMe.c2
-rw-r--r--bitmap.c9
-rwxr-xr-xinventory1
-rw-r--r--mdadm.82
-rw-r--r--mdadm.h1
-rw-r--r--mdadm.spec2
-rw-r--r--mdassemble.82
-rw-r--r--super1.c13
11 files changed, 64 insertions, 14 deletions
diff --git a/ANNOUNCE-2.6.7.1 b/ANNOUNCE-2.6.7.1
new file mode 100644
index 0000000..18594fd
--- /dev/null
+++ b/ANNOUNCE-2.6.7.1
@@ -0,0 +1,27 @@
+Subject: ANNOUNCE: mdadm 2.6.7.1 - A tool for managing Soft RAID under Linux
+
+I am pleased to announce the availability of
+ mdadm version 2.6.7.1
+
+It is available at the usual places:
+ countrycode=xx.
+ http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
+and via git at
+ git://neil.brown.name/mdadm
+ http://neil.brown.name/git?p=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.6.7.1 fixes two bugs in 2.6.7 and is a special release
+for Debian Lenny (which is too frozen to take 2.6.8).
+
+Changelog Entries:
+ - Manage: allow adding device that is just large enough to v1.x array.
+ - Fix bug in forced assemble.
+
+Development of mdadm is sponsored by
+ SUSE Labs, Novell Inc.
+
+NeilBrown 15th October 2008
diff --git a/Assemble.c b/Assemble.c
index 36b2304..79f0912 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -656,7 +656,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
continue;
}
tst = dup_super(st);
- if (tst->ss->load_super(st,fd, NULL)) {
+ if (tst->ss->load_super(tst,fd, NULL)) {
close(fd);
fprintf(stderr, Name ": RAID superblock disappeared from %s - not updating.\n",
devices[chosen_drive].devname);
diff --git a/Manage.c b/Manage.c
index 1fb8468..12e24dd 100644
--- a/Manage.c
+++ b/Manage.c
@@ -344,14 +344,6 @@ int Manage_subdevs(char *devname, int fd,
if (array.not_persistent == 0) {
- /* Make sure device is large enough */
- if (tst->ss->avail_size(tst, ldsize/512) <
- array_size) {
- fprintf(stderr, Name ": %s not large enough to join array\n",
- dv->devname);
- return 1;
- }
-
/* need to find a sample superblock to copy, and
* a spare slot to use
*/
@@ -381,6 +373,15 @@ int Manage_subdevs(char *devname, int fd,
fprintf(stderr, Name ": cannot find valid superblock in this array - HELP\n");
return 1;
}
+
+ /* Make sure device is large enough */
+ if (tst->ss->avail_size(tst, ldsize/512) <
+ array_size) {
+ fprintf(stderr, Name ": %s not large enough to join array\n",
+ dv->devname);
+ return 1;
+ }
+
/* Possibly this device was recently part of the array
* and was temporarily removed, and is now being re-added.
* If so, we can simply re-add it.
diff --git a/ReadMe.c b/ReadMe.c
index 0a736ed..2631a66 100644
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -24,7 +24,7 @@
#include "mdadm.h"
-char Version[] = Name " - v2.6.7 - 6th June 2008\n";
+char Version[] = Name " - v2.6.7.1 - 15th October 2008\n";
/*
* File: ReadMe.c
diff --git a/bitmap.c b/bitmap.c
index fdf8884..b647939 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -115,6 +115,15 @@ unsigned long long bitmap_bits(unsigned long long array_size,
return (array_size * 512 + chunksize - 1) / chunksize;
}
+unsigned long bitmap_sectors(struct bitmap_super_s *bsb)
+{
+ unsigned long long bits = bitmap_bits(__le64_to_cpu(bsb->sync_size),
+ __le32_to_cpu(bsb->chunksize));
+ int bits_per_sector = 8*512;
+ return (bits + bits_per_sector - 1) / bits_per_sector;
+}
+
+
bitmap_info_t *bitmap_fd_read(int fd, int brief)
{
/* Note: fd might be open O_DIRECT, so we must be
diff --git a/inventory b/inventory
index 8c0a8d1..ecedef1 100755
--- a/inventory
+++ b/inventory
@@ -22,6 +22,7 @@ ANNOUNCE-2.6.4
ANNOUNCE-2.6.5
ANNOUNCE-2.6.6
ANNOUNCE-2.6.7
+ANNOUNCE-2.6.7.1
Assemble.c
bitmap.c
bitmap.h
diff --git a/mdadm.8 b/mdadm.8
index f0381b6..e3bf32e 100644
--- a/mdadm.8
+++ b/mdadm.8
@@ -5,7 +5,7 @@
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\" See file COPYING in distribution for details.
-.TH MDADM 8 "" v2.6.7
+.TH MDADM 8 "" v2.6.7.1
.SH NAME
mdadm \- manage MD devices
.I aka
diff --git a/mdadm.h b/mdadm.h
index 5c18d15..ce140e5 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -474,6 +474,7 @@ extern int CreateBitmap(char *filename, int force, char uuid[16],
int major);
extern int ExamineBitmap(char *filename, int brief, struct supertype *st);
extern int bitmap_update_uuid(int fd, int *uuid, int swap);
+extern unsigned long bitmap_sectors(struct bitmap_super_s *bsb);
extern int md_get_version(int fd);
extern int get_linux_version(void);
diff --git a/mdadm.spec b/mdadm.spec
index 8e1a9bb..a277ae8 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.6.7
+Version: 2.6.7.1
Release: 1
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tgz
URL: http://neil.brown.name/blog/mdadm
diff --git a/mdassemble.8 b/mdassemble.8
index d60c775..4da11d0 100644
--- a/mdassemble.8
+++ b/mdassemble.8
@@ -1,5 +1,5 @@
.\" -*- nroff -*-
-.TH MDASSEMBLE 8 "" v2.6.7
+.TH MDASSEMBLE 8 "" v2.6.7.1
.SH NAME
mdassemble \- assemble MD devices
.I aka
diff --git a/super1.c b/super1.c
index fe915f8..e1d0219 100644
--- a/super1.c
+++ b/super1.c
@@ -1214,10 +1214,21 @@ static struct supertype *match_metadata_desc1(char *arg)
*/
static __u64 avail_size1(struct supertype *st, __u64 devsize)
{
+ struct mdp_superblock_1 *super = st->sb;
if (devsize < 24)
return 0;
- devsize -= choose_bm_space(devsize);
+ if (super == NULL)
+ /* creating: allow suitable space for bitmap */
+ devsize -= choose_bm_space(devsize);
+#ifndef MDASSEMBLE
+ else if (__le32_to_cpu(super->feature_map)&MD_FEATURE_BITMAP_OFFSET) {
+ /* hot-add. allow for actual size of bitmap */
+ struct bitmap_super_s *bsb;
+ bsb = (struct bitmap_super_s *)(((char*)super)+1024);
+ devsize -= bitmap_sectors(bsb);
+ }
+#endif
switch(st->minor_version) {
case -1: /* no specified. Now time to set default */