diff options
author | Doug Ledford <dledford@redhat.com> | 2008-10-28 10:50:17 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2008-10-28 10:50:17 -0400 |
commit | c1f11bd8bbb8aa48ec3f22587fbf710f438ff954 (patch) | |
tree | fc713275c8532f4ac783cce3c4c7dbd02750951c | |
parent | 333bfd84a89dc14ec5f734f18441b28e2f5eb28d (diff) | |
parent | c04bf2398e49763460c0e04df3130566ced16555 (diff) | |
download | mdadm-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.1 | 27 | ||||
-rw-r--r-- | Assemble.c | 2 | ||||
-rw-r--r-- | Manage.c | 17 | ||||
-rw-r--r-- | ReadMe.c | 2 | ||||
-rw-r--r-- | bitmap.c | 9 | ||||
-rwxr-xr-x | inventory | 1 | ||||
-rw-r--r-- | mdadm.8 | 2 | ||||
-rw-r--r-- | mdadm.h | 1 | ||||
-rw-r--r-- | mdadm.spec | 2 | ||||
-rw-r--r-- | mdassemble.8 | 2 | ||||
-rw-r--r-- | super1.c | 13 |
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 @@ -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); @@ -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. @@ -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 @@ -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 @@ -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 @@ -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 @@ -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); @@ -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 @@ -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 */ |