~psusi/ubuntu/precise/dmraid/fix-gpt

« back to all changes in this revision

Viewing changes to 1.0.0.rc16/lib/format/ataraid/hpt45x.h

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2010-02-04 21:34:22 UTC
  • mfrom: (1.1.4 upstream) (2.4.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100204213422-tdag8lcxpr7ahmg4
Tags: 1.0.0.rc16-3ubuntu1
* Merge from debian testing. (LP: #503136)  Remaining changes:
  - debian/dmraid-activate: Remove the special-casing of the root
    device which breaks in many situations and leaves the raw devices
    exposed. This was introduced in Debian to accommodate some broken
    configurations which wanted to access "partitions" on the raid
    raw devices. In Ubuntu, broken configurations has not been supported.
  - debian/dmraid.postinst: Comment out "udevadm trigger" call in postinst
    for now as it has severeconsequences when mountall is installed
    (clears /tmp).  If dmraid is installed, then presumably the important
    system devices are up and one canbe bothered with a reboot to take 
    the change into account. Let update-initramfs flag the system
    as needing a reboot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2004,2005  Heinz Mauelshagen, Red Hat GmbH.
 
3
 *                          All rights reserved.
 
4
 *
 
5
 * See file LICENSE at the top of this source tree for license information.
 
6
 */
 
7
 
 
8
#ifndef _HPT45X_H_
 
9
#define _HPT45X_H_
 
10
 
 
11
#ifdef  FORMAT_HANDLER
 
12
#undef  FORMAT_HANDLER
 
13
 
 
14
#include <stdint.h>
 
15
 
 
16
/* Highpoint 45x config data sector offset off end of disk */
 
17
#define HPT45X_CONFIGOFFSET     ((di->sectors - 11) << 9)
 
18
#define HPT45X_DATAOFFSET       0 /* Data offset in sectors */
 
19
 
 
20
/* Ondisk metadata for Highpoint 45X ATARAID */
 
21
struct hpt45x {
 
22
        uint32_t        magic;          /* 0x0 - 0x03 */
 
23
#define HPT45X_MAGIC_OK   0x5a7816f3
 
24
#define HPT45X_MAGIC_BAD  0x5a7816fd
 
25
 
 
26
        uint32_t        magic_0;        /* 0x04 - 0x07 Set identifier */
 
27
        uint32_t        magic_1;        /* 0x08 - 0x0A (Sub-)Array identifier */
 
28
 
 
29
        uint32_t        total_secs;     /* 0x0B - 0x0F */
 
30
 
 
31
        uint8_t type;           /* 0x10 */
 
32
#define HPT45X_T_SPAN   0x04
 
33
#define HPT45X_T_RAID0  0x05
 
34
#define HPT45X_T_RAID1  0x06
 
35
 
 
36
        uint8_t raid_disks;     /* 0x11 */
 
37
        uint8_t disk_number;    /* 0x12 */
 
38
        uint8_t raid0_shift;    /* 0x13 */
 
39
 
 
40
        uint32_t        dummy[3];       /* 0x14 - 0x1F */
 
41
 
 
42
        uint8_t raid1_type;             /* 0x20 */
 
43
        uint8_t raid1_raid_disks;       /* 0x21 */
 
44
        uint8_t raid1_disk_number;      /* 0x22 */
 
45
        uint8_t raid1_shift;            /* 0x23 */
 
46
 
 
47
        uint32_t        dummy1[3];      /* 0x24 - 0x2F */
 
48
} __attribute__ ((packed));
 
49
#endif
 
50
 
 
51
int register_hpt45x(struct lib_context *lc);
 
52
 
 
53
#endif