From 9a83093a9f829557b04e766ee7a2105757f87b04c416f4b6cc46f6b0b4108f8f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 12 Sep 2007 14:47:22 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dmraid?expand=0&rev=8 --- README.SuSE | 11 ++++++++++ dmraid-pdc_max_sectors.patch | 40 ++++++++++++++++++++++++++++++++++++ dmraid.changes | 6 ++++++ dmraid.spec | 11 ++++++++-- 4 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 README.SuSE create mode 100644 dmraid-pdc_max_sectors.patch diff --git a/README.SuSE b/README.SuSE new file mode 100644 index 0000000..9cbbb2d --- /dev/null +++ b/README.SuSE @@ -0,0 +1,11 @@ +Note about some pdc card: + + Model: "Promise FastTrak100 TX2" + Vendor: pci 0x105a "Promise Technology, Inc." + Device: pci 0x6268 "PDC20270 (FastTrak100 LP/TX2/TX4)" + SubVendor: pci 0x105a "Promise Technology, Inc." + SubDevice: pci 0x4d68 "FastTrak100 TX2" + +This card detects only devices to 128 GB. If you are running dmraid +with this card you will only be able to use the space up to this limit. + diff --git a/dmraid-pdc_max_sectors.patch b/dmraid-pdc_max_sectors.patch new file mode 100644 index 0000000..6d4edcc --- /dev/null +++ b/dmraid-pdc_max_sectors.patch @@ -0,0 +1,40 @@ +Index: 1.0.0.rc14/lib/format/ataraid/pdc.c +=================================================================== +--- 1.0.0.rc14.orig/lib/format/ataraid/pdc.c ++++ 1.0.0.rc14/lib/format/ataraid/pdc.c +@@ -155,6 +155,21 @@ static void *pdc_read_metadata(struct li + } + } + ++ /* 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); + } + +Index: 1.0.0.rc14/lib/format/ataraid/pdc.h +=================================================================== +--- 1.0.0.rc14.orig/lib/format/ataraid/pdc.h ++++ 1.0.0.rc14/lib/format/ataraid/pdc.h +@@ -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 diff --git a/dmraid.changes b/dmraid.changes index 09633ae..c994bd3 100644 --- a/dmraid.changes +++ b/dmraid.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 12 14:44:57 CEST 2007 - mkoenig@suse.de + +- add quirk for maximum detected device size of some pdc card + [#215222] + ------------------------------------------------------------------- Tue Jul 31 14:42:18 CEST 2007 - hare@suse.de diff --git a/dmraid.spec b/dmraid.spec index 5db1d96..b907ab1 100644 --- a/dmraid.spec +++ b/dmraid.spec @@ -19,10 +19,11 @@ Group: System/Base Autoreqprov: on Summary: A Device-Mapper Software RAID Support Tool Version: 1.0.0.rc14 -Release: 9 +Release: 18 Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2 Source1: sysconfig.dmraid Source2: boot.dmraid +Source3: README.SuSE Patch0: dmraid_fixup_paths3.diff Patch1: dmraid-add_uuid.patch Patch2: dmraid_fixup_nvidia.diff @@ -30,6 +31,7 @@ Patch3: dmraid_duplicate_args.patch Patch4: dmraid-1.0.0.rc13-geometry.patch Patch5: dmraid-1.0.0.rc13-jm_termination.patch Patch6: dmraid-1.0.0.rc13-fix_macro.patch +Patch7: dmraid-pdc_max_sectors.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq @@ -68,6 +70,8 @@ Authors: %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +cp %{SOURCE3} . %build #rm -f aclocal.m4 @@ -110,11 +114,14 @@ install -m744 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/boot.dmraid #%{_libdir}/libdmraid.so /sbin/dmraid %{_mandir}/man8/* -%doc LICENSE LICENSE_GPL LICENSE_LGPL README TODO doc/* +%doc LICENSE LICENSE_GPL LICENSE_LGPL README README.SuSE TODO doc/* /var/adm/fillup-templates/sysconfig.dmraid /etc/init.d/boot.dmraid %changelog +* Wed Sep 12 2007 - mkoenig@suse.de +- add quirk for maximum detected device size of some pdc card + [#215222] * Tue Jul 31 2007 - hare@suse.de - dmraid requires kpartx. * Mon Jul 30 2007 - hare@suse.de