Package: dmraid Severity: wishlist Version: 1.0.0.rc14-1 User: [EMAIL PROTECTED] Usertags: origin-ubuntu ubuntu-patch hardy ubuntu
Attached is a patch to fix some issues with metadata handling for Promise Software RAID. This patch is currently in the Ubuntu dmraid package, and therefore the attached patch is in dpatch format. It would be nice if this patch was in the Debian package, thereby reducing the delta between Ubuntu and Debian. Originally taken from Mandriva's dmraid package. Luke
#! /bin/sh /usr/share/dpatch/dpatch-run ## 08_promise-metadata-fixes.dpatch by Luke Yelavich <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Promise metadata fixes. @DPATCH@ diff -urNad dmraid-1.0.0.rc14-1ubuntu1~/1.0.0.rc14/lib/format/ataraid/pdc.c dmraid-1.0.0.rc14-1ubuntu1/1.0.0.rc14/lib/format/ataraid/pdc.c --- dmraid-1.0.0.rc14-1ubuntu1~/1.0.0.rc14/lib/format/ataraid/pdc.c 2006-10-02 21:19:33.000000000 +1000 +++ dmraid-1.0.0.rc14-1ubuntu1/1.0.0.rc14/lib/format/ataraid/pdc.c 2008-07-08 14:29:10.000000000 +1000 @@ -155,6 +155,21 @@ } } + /* Some pdc card detect only PDC_MAX_SECTOR sectors, even + * if the disk is bigger, this prevents dmraid from discovering + * the metadata. This quirk searches for metadata at the + * sector PDC_MAX_SECTOR + */ + if (di->sectors >= PDC_MAX_SECTOR) { + if (read_file(lc, handler, di->path, ret, sizeof(*ret), + PDC_MAX_SECTOR << 9) && + !strncmp((const char*) ret->promise_id, PDC_MAGIC, + PDC_ID_LENGTH)) { + info->u32 = PDC_MAX_SECTOR; + return (void*) ret; + } + } + dbg_free(ret); } diff -urNad dmraid-1.0.0.rc14-1ubuntu1~/1.0.0.rc14/lib/format/ataraid/pdc.h dmraid-1.0.0.rc14-1ubuntu1/1.0.0.rc14/lib/format/ataraid/pdc.h --- dmraid-1.0.0.rc14-1ubuntu1~/1.0.0.rc14/lib/format/ataraid/pdc.h 2006-02-11 02:01:42.000000000 +1100 +++ dmraid-1.0.0.rc14-1ubuntu1/1.0.0.rc14/lib/format/ataraid/pdc.h 2008-07-08 14:29:12.000000000 +1000 @@ -16,6 +16,9 @@ #define PDC_CONFIGOFFSETS 63,255,256,16,399,735 #define PDC_DATAOFFSET 0 +/* maximum device size (sectors) which can be detected by some pdc card */ +#define PDC_MAX_SECTOR 268435377UL + /* Ondisk metadata for Promise Fastrack */ struct pdc { #define PDC_ID_LENGTH 24
signature.asc
Description: Digital signature