Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 194805 Details for
Bug 232062
Patch for dmraid to support raid 1+0 (raid10) on Intel fakeraid
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Various patches used by ubuntu
dmraid-1.0.0_rc15-ubuntu-patch-rollup.patch (text/plain), 17.32 KB, created by
Ian Stakenvicius (RETIRED)
on 2009-06-15 16:20:32 UTC
(
hide
)
Description:
Various patches used by ubuntu
Filename:
MIME Type:
Creator:
Ian Stakenvicius (RETIRED)
Created:
2009-06-15 16:20:32 UTC
Size:
17.32 KB
patch
obsolete
>Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: remove whitespace from serial id (LP: #305011) >--- a/1.0.0.rc15/lib/device/scsi.c >+++ b/1.0.0.rc15/lib/device/scsi.c >@@ -110,7 +110,10 @@ get_scsi_serial(struct lib_context *lc, > } > > ret = ret && >- (di->serial = dbg_strdup((char *) &response[p->start + 1])); >+ (di->serial = >+ dbg_strdup(remove_white_space(lc, >+ (char *) &response[p->start + 1], >+ serial_len))); > } > > dbg_free(response); >Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: Fix hyphen-used-as-minus-sign >--- a/1.0.0.rc15/man/dmraid.8 >+++ b/1.0.0.rc15/man/dmraid.8 >@@ -4,19 +4,19 @@ dmraid \- discover, configure and activa > .SH SYNOPSIS > .B dmraid > {-a|--activate} {y|n|yes|no} >- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] >- [-f|--format FORMAT[,FORMAT...]] >+ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] >+ [\-f|--format FORMAT[,FORMAT...]] > [{-P|--partchar} CHAR] >- [-p|--no_partitions] >- [--separator SEPARATOR] >- [-t|--test] >+ [\-p|--no_partitions] >+ [\--separator SEPARATOR] >+ [\-t|--test] > [RAID-set...] > > .B dmraid > {-b|--block_devices} >- [-c|--display_columns][FIELD[,FIELD...]]... >- [-d|--debug]... [-v|--verbose]... >- [--separator SEPARATOR] >+ [\-c|--display_columns][FIELD[,FIELD...]]... >+ [\-d|--debug]... [\-v|--verbose]... >+ [\--separator SEPARATOR] > [device-path...] > > .B dmraid >@@ -24,60 +24,60 @@ dmraid \- discover, configure and activa > > .B dmraid > {-l|--list_formats} >- [-d|--debug]... [-v|--verbose]... >+ [\-d|--debug]... [\-v|--verbose]... > > .B dmraid > {-n|--native_log} >- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] >- [-f|--format FORMAT[,FORMAT...]] >- [--separator SEPARATOR] >+ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] >+ [\-f|--format FORMAT[,FORMAT...]] >+ [\--separator SEPARATOR] > [device-path...] > > .B dmraid >- {-R| --rebuild} >+ {-R| \--rebuild} > RAID-set > [device-path] > > .B dmraid >- {-x| --remove} >+ {-x| \--remove} > [RAID-set] > > .B dmraid >- -f FORMAT-handler >-{-C| --create} set >- --type raidlevel >- [--size=setsize --strip stridesize] >- --disk "device-path, device-path [, device-path ...]" >+ \-f FORMAT-handler >+{-C| \--create} set >+ \--type raidlevel >+ [\--size=setsize \--strip stridesize] >+ \--disk "device-path, device-path [, device-path ...]" > > .B dmraid >-[ -f|--format FORMAT-handler] >--S|--spare [RAID-set] >--M|--media "device-path" >+[ \-f|--format FORMAT-handler] >+\-S|--spare [RAID-set] >+\-M|--media "device-path" > > .B dmraid > {-r|--raid_devices} >- [-c|--display_columns][FIELD[,FIELD...]]... >- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] >- [-D|--dump_metadata] >- [-f|--format FORMAT[,FORMAT...]] >- [--separator SEPARATOR] >+ [\-c|--display_columns][FIELD[,FIELD...]]... >+ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] >+ [\-D|--dump_metadata] >+ [\-f|--format FORMAT[,FORMAT...]] >+ [\--separator SEPARATOR] > [device-path...] > > .B dmraid > {-r|--raid_devices} >- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] >- [-E|--erase_metadata] >- [-f|--format FORMAT[,FORMAT...]] >- [--separator SEPARATOR] >+ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] >+ [\-E|--erase_metadata] >+ [\-f|--format FORMAT[,FORMAT...]] >+ [\--separator SEPARATOR] > [device-path...] > > .B dmraid > {-s|--sets}...[a|i|active|inactive] >- [-c|--display_columns][FIELD[,FIELD...]]... >- [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking] >- [-f|--format FORMAT[,FORMAT...]] >- [-g|--display_group] >- [--separator SEPARATOR] >+ [\-c|--display_columns][FIELD[,FIELD...]]... >+ [\-d|--debug]... [\-v|--verbose]... [\-i|--ignorelocking] >+ [\-f|--format FORMAT[,FORMAT...]] >+ [\-g|--display_group] >+ [\--separator SEPARATOR] > [RAID-set...] > > .B dmraid >@@ -112,7 +112,7 @@ When activating RAID sets, > .B -p > disables the activation of partitions on them. > RAID set names given on command line don't need to be fully specified >-(eg, "dmraid -ay sil" would activate all discovered Silicon Image Medley >+(eg, "dmraid \-ay sil" would activate all discovered Silicon Image Medley > RAID sets). > > .TP >@@ -129,7 +129,7 @@ See description of > below for FIELD identifiers. > > .TP >-.I [-d|--debug]... >+.I [\-d|--debug]... > Enable debugging output. Opion can be given multiple times > increasing the debug output level. > >@@ -209,18 +209,18 @@ is added to the system. > During system reboot, enter OROM and mark the new drive as the rebuild drive. > After booting to the OS, use the dmraid command to rebuild. > >- Example: dmraid -R raid_set >+ Example: dmraid \-R raid_set > > 2. Using dmraid to identify a new drive > Boot to the OS and use the dmraid command with the new drive as > the second parameter. > >- Example: dmraid -R raid_set /dev/sdc >+ Example: dmraid \-R raid_set /dev/sdc > > 3. Using hot spare drive >- Mark a drive as hot spare using the "dmraid -f isw -S" command. Then use the dmraid command to start the rebuild. >+ Mark a drive as hot spare using the "dmraid \-f isw \-S" command. Then use the dmraid command to start the rebuild. > >- Example: dmraid -R raid_set >+ Example: dmraid \-R raid_set > > .TP > .I {-x|--remove} [RAID-set] >@@ -230,11 +230,11 @@ Delete one or all existing software RAID > .I -f FORMAT-handler {-C|--create} --type raidlevel [--size=setsize --strip stripsize] --disk "device-path, device-path [,device-path]" > Delete one or all existing Configure a software RAID device and store the configuration data in a group of hard drive devices consisting of this array. This command requires the following options: > >--f FORMAT-handler >+\-f FORMAT-handler > .br >- metadata format (see "dmraid -l") >+ metadata format (see "dmraid \-l") > .br >---type digit[digit...] >+\--type digit[digit...] > .br > specify the raid level of the software RAID set. > .br >@@ -246,7 +246,7 @@ Delete one or all existing Configure a s > .br > 01: raid01 (isw raid10) > .br >---size: [digits[k|K|m|M|g|G][b|B]] >+\--size: [digits[k|K|m|M|g|G][b|B]] > .br > specify the size of the RAID set.The number is an integer followed by [kKmMgG] and/or [bB]. > .br >@@ -262,11 +262,11 @@ Delete one or all existing Configure a s > .br > If this option is missing, it's set to the default value pre-configured by the vendor. Note that different vendors may apply different constraints on the granularity of the size or the minimal value. > .br >---strip: [digits[k|K|m|M|g|G][b|B]] >+\--strip: [digits[k|K|m|M|g|G][b|B]] > .br > specify the strip size of a RAID1, RAID5, and RAID10 RAID set (as above) > .br >---disk: device-path[{,| }device-path...] >+\--disk: device-path[{,| }device-path...] > .br > specify the array of the hard drives, e.g. /dev/sda. > >@@ -344,7 +344,7 @@ Use SEPARATOR as a delimiter for all opt > .TP > .I -s... [a|i] [RAID-set...] > Display properties of RAID sets. Multiple RAID set names can be given >-on the command line which don't need to be fully specified (eg, "dmraid -s hpt" >+on the command line which don't need to be fully specified (eg, "dmraid \-s hpt" > would display all discovered Highpoint RAID sets). Enter > .B -s > twice to display RAID subsets too. >@@ -372,7 +372,7 @@ Enable verbose runtime information outpu > increasing the verbosity level. > > .SH EXAMPLES >-"dmraid -l" lists all supported metadata formats with their names along with >+"dmraid \-l" lists all supported metadata formats with their names along with > some descriptive information, eg: > .br > hpt37x : (+) Highpoint HPT37X >@@ -395,16 +395,16 @@ dos : (+) DOS partitions on SW RAIDs > .br > (0): Discover, (+): Discover+Activate > >-"dmraid -ay" activates all software RAID sets discovered. >+"dmraid \-ay" activates all software RAID sets discovered. > >-"dmraid -an" deactivates all active software RAID sets which are not open >+"dmraid \-an" deactivates all active software RAID sets which are not open > (eg, mounted filesystem on them). > >-"dmraid -ay -f pdc" (pdc looked up from "dmraid -l") activates all >+"dmraid \-ay \-f pdc" (pdc looked up from "dmraid \-l") activates all > software RAID sets with Promise format discovered and ignores all other > supported formats. > >-"dmraid -r" discovers all software RAID devices supported on your system, eg: >+"dmraid \-r" discovers all software RAID devices supported on your system, eg: > .br > /dev/dm-46: hpt45x, "hpt45x_chidjhaiaa-0", striped, ok, 320172928 sectors, data@ 0 > .br >@@ -415,7 +415,7 @@ supported formats. > /dev/dm-58: hpt45x, "hpt45x_chidjhaiaa-1", striped, ok, 320172928 sectors, data@ 0 > > >-"dmraid -s -s hpt45x_chidjhaiaa" displays properties of >+"dmraid \-s \-s hpt45x_chidjhaiaa" displays properties of > set "hpt45x_chidjhaiaa", eg: > .br > *** Superset >@@ -473,7 +473,7 @@ dev : 2 > spare : 0 > .br > >-"dmraid -s -ccs hpt45" displays properties in column format of all sets >+"dmraid \-s \-ccs hpt45" displays properties in column format of all sets > and subsets with hpt45* format, eg: > .br > hpt45x_chidjhaiaa,640345856,128,raid10,ok,4,0 >@@ -482,7 +482,7 @@ hpt45x_chidjhaiaa-a,640345856,128,stripe > .br > hpt45x_chidjhaiaa-b,640345856,128,stripe,ok,2,0 > >-"dmraid -r --sep : -cpath:size" display paths and sizes in sectors for >+"dmraid \-r \--sep : \-cpath:size" display paths and sizes in sectors for > RAID devices in column format using ':' as a delimiter, eg: > .br > /dev/dm-8:320173055 >@@ -513,18 +513,18 @@ RAID devices in column format using ':' > .br > /dev/dm-66:390624896 > >-"dmraid -f isw -C Raid0 --type 0 --strip 8k --size 20g --disk "/dev/sdb /dev/sdc"" creates an ISW volume with >+"dmraid \-f isw \-C Raid0 \--type 0 \--strip 8k \--size 20g \--disk "/dev/sdb /dev/sdc"" creates an ISW volume with > a name of "Raid0", 20Gig bytes in total, and 8kilo bytes strip size on two disks. > >-"dmraid -f isw -C Test0 --type 0 --disk "/dev/sdd /dev/sde"" creates an ISW volume with the default size and strip size. >+"dmraid \-f isw \-C Test0 \--type 0 \--disk "/dev/sdd /dev/sde"" creates an ISW volume with the default size and strip size. > >-"dmraid -f isw -C Test10 --type 01 --strip 128B --disk "/dev/sda /dev/sdb /dev/sdc /dev/sdd" creates a stacked >+"dmraid \-f isw \-C Test10 \--type 01 \--strip 128B \--disk "/dev/sda /dev/sdb /dev/sdc /dev/sdd" creates a stacked > RAID device, RAID10 (isw format), with a name of "Test10", 128 blocks (512bytes) strip size , and the default volume size on > 4 disks. > >-"dmraid -f isw -S -M /dev/sde" marks the device /dev/sde as a hot spare for rebuild >+"dmraid \-f isw \-S \-M /dev/sde" marks the device /dev/sde as a hot spare for rebuild > >-"dmraid -R isw_djaggchdde_RAID1 /dev/sde" starts rebuild of the RAID volume on device /dev/sde >+"dmraid \-R isw_djaggchdde_RAID1 /dev/sde" starts rebuild of the RAID volume on device /dev/sde > > .SH DIAGNOSTICS > dmraid returns an exit code of 0 for success or 1 for error. >Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: Removed "p" from device name. A proper upgrade script is needed before using it. >--- a/1.0.0.rc15/lib/format/partition/dos.c >+++ b/1.0.0.rc15/lib/format/partition/dos.c >@@ -31,7 +31,7 @@ _name(struct lib_context *lc, struct rai > { > const char *base = get_basename(lc, rd->di->path); > >- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc), >+ return type ? snprintf(str, len, "%s%u", base, > partition) : snprintf(str, len, "%s", base); > } > >Fix segfault when attempting to generate name for jmicron controllers. >LP #344215 >--- a/1.0.0.rc15/lib/format/ataraid/jm.c >+++ b/1.0.0.rc15/lib/format/ataraid/jm.c >@@ -25,18 +25,19 @@ static int member(struct jm *jm); > static char * > name(struct lib_context *lc, struct raid_dev *rd, unsigned int subset) > { >- int i; >+ size_t i = JM_NAME_LEN-1; > size_t len; > struct jm *jm = META(rd, jm); >- char buf[JM_NAME_LEN + 1], *ret, *name = (char *) jm->name; >+ char *ret, *name = (char *) jm->name; >+ char buf[JM_NAME_LEN+1] = { '\0' }; > >- /* Name always 0 terminated or whitespace at end ? */ >- strncpy(buf, name, JM_NAME_LEN); >- len = strlen(buf); >- i = len < JM_NAME_LEN ? len : JM_NAME_LEN; >- buf[i] = 0; >- while (i-- && isspace(buf[i])) >- buf[i] = 0; >+ /* Sanitize name, make sure it's null terminated */ >+ strncpy(buf, jm->name, JM_NAME_LEN); >+ while (i && isspace(buf[i])) { >+ name[i]='\0'; >+ buf[i]='\0'; >+ --i; >+ } > > len = strlen(buf) + sizeof(HANDLER) + (jm->mode == JM_T_RAID01 ? 3 : 2); > if ((ret = dbg_malloc(len))) { >Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: fix FTBFS when LED support is enabled >--- a/1.0.0.rc15/include/dmraid/misc.h >+++ b/1.0.0.rc15/include/dmraid/misc.h >@@ -64,7 +64,7 @@ div_up(uint64_t what, unsigned int by) > #define LED_OFF 0 > #define LED_REBUILD 1 > >-int led(char *rd, int status); >+int led(const char *rd, int status); > #endif > > #endif >Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: Fix Metadata is not put in the NORMAL state after dmraid rebuild is started manually > (Origin: Upstream) >--- a/1.0.0.rc15/lib/misc/init.c >+++ b/1.0.0.rc15/lib/misc/init.c >@@ -15,7 +15,7 @@ libdmraid_init(int argc, char **argv) > { > struct lib_context *lc; > >- dso = (argv[0] && strcmp(argv[0], "dso")) ? 1 : 0; >+ dso = (argv[0] && !strcmp(argv[0], "dso")) ? 1 : 0; > > if ((lc = alloc_lib_context(argv))) { > if (!register_format_handlers(lc)) { >Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: Fix ISW Metadata is corrupted after rebuilding is started > (Origin: Upstream) >--- a/1.0.0.rc15/lib/format/ataraid/isw.c >+++ b/1.0.0.rc15/lib/format/ataraid/isw.c >@@ -2387,14 +2387,13 @@ update_metadata_isw_dev(struct isw *new_ > * a new function 'raid_is_rebuildable()'. > */ > ((struct isw_map *) >- ((void *) &new_dev->vol.map + map_size))->map_state = >+ ((void *) &new_dev->vol.map) + map_size)->map_state = > new_dev->vol.map.raid_level == ISW_T_RAID0 ? > ISW_T_STATE_FAILED : ISW_T_STATE_DEGRADED; > > return (unsigned) >- ((unsigned long) &new_dev->vol.map + 2 * map_size) - >- ((unsigned long) new_isw->disk + new_isw->num_disks) - >- isw_dev_offs; >+ ((unsigned long) (((void*) &new_dev->vol.map) + 2 * map_size)) - >+ ((unsigned long) new_dev); > } > > /* Update metadata wit hdrive to rebuild. */ >Author: Luke Yelavich <themuso@ubuntu.com> >Description: Add extra offsets where promise metadata can be found. >--- a/1.0.0.rc15/lib/format/ataraid/pdc.h >+++ b/1.0.0.rc15/lib/format/ataraid/pdc.h >@@ -13,7 +13,7 @@ > > #include <stdint.h> > >-#define PDC_CONFIGOFFSETS 63,255,256,16,399,675,735,974,991 >+#define PDC_CONFIGOFFSETS 63,255,256,16,399,675,735,974,991,911,974,591 > #define PDC_DATAOFFSET 0 > > /* >Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: Fix exit-code for "No RAID disks" and "no block devices found" errors (LP: #300825) >--- a/1.0.0.rc15/lib/metadata/metadata.c >+++ b/1.0.0.rc15/lib/metadata/metadata.c >@@ -2092,7 +2092,7 @@ get_metadata(struct lib_context *lc, enu > > if (!count_devices(lc, DEVICE)) { > log_print(lc, "no block devices found"); >- return 1; >+ return 0; > } > > if (!(M_RAID & p->metadata)) >@@ -2114,7 +2114,7 @@ get_metadata(struct lib_context *lc, enu > if (!OPT_HOT_SPARE_SET(lc) && !OPT_CREATE(lc) > && !count_devices(lc, RAID)) { > format_error(lc, "disks", argv); >- return 1; >+ return 0; > } > > if (M_SET & p->metadata) { >Author: Giuseppe Iuculano <giuseppe@iuculano.it> >Description: Fix mismatch between BIOS and dmraid's view of ISW raid 10 sets > (Origin: Fedora) >--- a/1.0.0.rc15/lib/format/ataraid/isw.c >+++ b/1.0.0.rc15/lib/format/ataraid/isw.c >@@ -155,7 +155,7 @@ name(struct lib_context *lc, struct raid > > while (i--) { > if (disk == isw->disk + i) { >- id = i % 2; >+ id = i / 2; > goto ok; > } > } >Author: Luke Yelavich <themuso@ubuntu.com> >Description: Support for checking virtio devices for dmraid metadata. >--- a/1.0.0.rc15/lib/device/scan.c >+++ b/1.0.0.rc15/lib/device/scan.c >@@ -174,7 +174,7 @@ interested(struct lib_context *lc, char > * Whole IDE and SCSI disks only. > */ > return (!isdigit(name[strlen(name) - 1]) && >- (*(name + 1) == 'd' && (*name == 'h' || *name == 's'))) >+ (*(name + 1) == 'd' && (*name == 'h' || *name == 's' || *name == 'v'))) > #ifdef DMRAID_TEST > /* > * Include dm devices for testing. >Author: Sam Bingner <sam@bingner.com> >Description: Change the serial number scan to only look at the LAST 16 bytes rather than the first > (LP: #267953) >--- a/1.0.0.rc15/lib/format/ataraid/isw.c >+++ b/1.0.0.rc15/lib/format/ataraid/isw.c >@@ -84,12 +84,19 @@ is_raid10(struct isw_dev *dev) > static struct isw_disk * > _get_disk(struct isw *isw, struct dev_info *di) > { >+ int off; >+ > if (di->serial) { > int i = isw->num_disks; > struct isw_disk *disk = isw->disk; > >+ if(strlen(di->serial) > MAX_RAID_SERIAL_LEN) >+ off=strlen(di->serial) - MAX_RAID_SERIAL_LEN; >+ else >+ off=0; >+ > while (i--) { >- if (!strncmp(di->serial, (const char *) disk[i].serial, >+ if (!strncmp(di->serial+off, (const char *) disk[i].serial, > MAX_RAID_SERIAL_LEN)) > return disk + i; > } >Fix for #524637. Do not subtract RAID_DS_JOURNAL >--- a/1.0.0.rc15/lib/format/ataraid/isw.c >+++ b/1.0.0.rc15/lib/format/ataraid/isw.c >@@ -674,7 +674,9 @@ _create_rd(struct lib_context *lc, > r->di = rd->di; > r->fmt = rd->fmt; > r->offset = dev->vol.map.pba_of_lba0; >- if ((r->sectors = dev->vol.map.blocks_per_member - RAID_DS_JOURNAL)) >+ /* Fix for #524637. Do not subtract RAID_DS_JOURNAL >+ if ((r->sectors = dev->vol.map.blocks_per_member - RAID_DS_JOURNAL)) */ >+ if ((r->sectors = dev->vol.map.blocks_per_member)) > goto out; > > log_zero_sectors(lc, rd->di->path, handler);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 232062
:
160628
|
160629
| 194805 |
204115