Re: Ubuntu Patches [15/16]
Phillip Susi <[email protected]> Sat, 19 Mar 2011 13:52:36 -0400
| Newsgroups | gmane.linux.ataraid |
|---|---|
| Message-ID | <[email protected]> |
Repost: formalized the description and cleaned up stylistic errors _______________________________________________ Ataraid-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/ataraid-list
22_add_pdc_64bit_addressing.patch
(text/x-patch, 3.3 KB)
From: Phillip Susi <[email protected]> Author: Danny Wood <[email protected]> Bug-Ubuntu: http://launchpad.net/bugs/599255 Subject: Adds 64-bit sector addressing to PDC driver Last-Update: 2011-03-08 Forwarded: yes Index: b/1.0.0.rc16/lib/format/ataraid/pdc.c =================================================================== --- a/1.0.0.rc16/lib/format/ataraid/pdc.c +++ b/1.0.0.rc16/lib/format/ataraid/pdc.c @@ -132,7 +132,8 @@ CVT32(pdc->raid.flags); CVT32(pdc->raid.magic_0); CVT32(pdc->raid.disk_secs); - CVT32(pdc->raid.total_secs); + CVT32(pdc->raid.total_secs_l); + CVT16(pdc->raid.total_secs_h); CVT16(pdc->raid.cylinders); CVT32(pdc->raid.magic_1); @@ -194,6 +195,9 @@ if (read_file(lc, handler, di->path, ret + ma, sizeof(*ret), sector << 9)) { + /* Log the metadata location */ + log_dbg(lc, "checking pdc metadata at %ld",sector << 9); + /* No signature? */ if (!is_signature(ret + ma)) { if (info->u32) @@ -311,13 +315,13 @@ switch (pdc->raid.type) { case PDC_T_RAID10: - return pdc->raid.total_secs / (pdc->raid.total_disks / 2); + return (((uint64_t)pdc->raid.total_secs_h << 32) + pdc->raid.total_secs_l) / (pdc->raid.total_disks / 2); case PDC_T_RAID1: - return pdc->raid.total_secs; + return (((uint64_t)pdc->raid.total_secs_h << 32) + pdc->raid.total_secs_l); case PDC_T_RAID0: - return pdc->raid.total_secs / pdc->raid.total_disks; + return (((uint64_t)pdc->raid.total_secs_h << 32) + pdc->raid.total_secs_l) / pdc->raid.total_disks; case PDC_T_SPAN: return rd->di->sectors - meta_sector; @@ -494,12 +498,12 @@ pdc->raid.total_disks / 2 : pdc->raid.total_disks; } - + static int check_rd(struct lib_context *lc, struct raid_set *rs, struct raid_dev *rd, void *context) { - return *((uint64_t *) context) >= (META(rd, pdc))->raid.total_secs; + return *((uint64_t *) context) >= (((uint64_t)(META(rd, pdc))->raid.total_secs_h << 32) + (META(rd, pdc))->raid.total_secs_l); } static int @@ -579,7 +583,8 @@ DP("raid.raid0_shift: %u", pdc, pdc->raid.raid0_shift); DP("raid.raid0_disks: %u", pdc, pdc->raid.raid0_disks); DP("raid.array_number: %u", pdc, pdc->raid.array_number); - DP("raid.total_secs: %u", pdc, pdc->raid.total_secs); + DP("raid.total_secs_h: %u", pdc, pdc->raid.total_secs_h); + DP("raid.total_secs_l: %u", pdc, pdc->raid.total_secs_l); DP("raid.cylinders: %u", pdc, pdc->raid.cylinders); DP("raid.heads: %u", pdc, pdc->raid.heads); DP("raid.sectors: %u", pdc, pdc->raid.sectors); Index: b/1.0.0.rc16/lib/format/ataraid/pdc.h =================================================================== --- a/1.0.0.rc16/lib/format/ataraid/pdc.h +++ b/1.0.0.rc16/lib/format/ataraid/pdc.h @@ -61,12 +61,13 @@ uint8_t raid0_shift; /* 0x221 */ uint8_t raid0_disks; /* 0x222 */ uint8_t array_number; /* 0x223 */ - uint32_t total_secs; /* 0x224 - 0x227 */ + uint32_t total_secs_l; /* 0x224 - 0x227 */ uint16_t cylinders; /* 0x228 - 0x229 */ uint8_t heads; /* 0x22A */ uint8_t sectors; /* 0x22B */ uint32_t magic_1; /* 0x22C - 0x2EF */ - uint32_t unknown_5; /* 0x230 - 0x233 */ + uint16_t unknown_5; /* 0x230 - 0x231 */ + uint16_t total_secs_h; /* 0x232 - 0x233 */ struct pdc_disk { uint16_t unknown_0; /* 0x234 - 0x235 */ uint8_t channel; /* 0x236 */
signature.asc
(application/pgp-signature, 262 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2E7WQACgkQJ4UciIs+XuKDIACgpUBVO+RLMObtK0a85RjxId9x uVIAoLKuZpKSvSyaIqYLw4uWrWw7sUSI =HpUK -----END PGP SIGNATURE-----