Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 203505 Details for
Bug 275451
(PATCH) sys-fs/dmraid-1.0.0_rc15 broken for multiple raid sets and long serial numbers
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
More patches from ubuntu
dmraid-ubuntu-patches.patch (text/plain), 6.06 KB, created by
Ian Stakenvicius (RETIRED)
on 2009-09-08 15:17:08 UTC
(
hide
)
Description:
More patches from ubuntu
Filename:
MIME Type:
Creator:
Ian Stakenvicius (RETIRED)
Created:
2009-09-08 15:17:08 UTC
Size:
6.06 KB
patch
obsolete
>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 275451
:
195787
|
203501
|
203502
|
203504
| 203505 |
211502