2
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3
* Copyright (C) 2004 Red Hat, Inc. All rights reserved.
5
* This file is part of LVM2.
7
* This copyrighted material is made available to anyone wishing to use,
8
* modify, copy, or redistribute it subject to the terms and conditions
9
* of the GNU General Public License v.2.
11
* You should have received a copy of the GNU General Public License
12
* along with this program; if not, write to the Free Software Foundation,
13
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
#ifndef _LVM_TEXT_LAYOUT_H
17
#define _LVM_TEXT_LAYOUT_H
20
#include "lvm-types.h"
26
uint64_t offset; /* Offset in bytes to start sector */
27
uint64_t size; /* Bytes */
28
} __attribute__ ((packed));
30
/* Data areas (holding PEs) */
31
struct data_area_list {
33
struct disk_locn disk_locn;
36
/* Fields with the suffix _xl should be xlate'd wherever they appear */
39
uint8_t pv_uuid[ID_LEN];
40
uint64_t device_size_xl; /* Bytes */
42
/* NULL-terminated list of data areas followed by */
43
/* NULL-terminated list of metadata area headers */
44
struct disk_locn disk_areas_xl[0]; /* Two lists */
45
} __attribute__ ((packed));
49
uint64_t offset; /* Offset in bytes to start sector */
50
uint64_t size; /* Bytes */
53
} __attribute__ ((packed));
56
/* Structure size limited to one sector */
58
uint32_t checksum_xl; /* Checksum of rest of mda_header */
59
uint8_t magic[16]; /* To aid scans for metadata */
61
uint64_t start; /* Absolute start byte of mda_header */
62
uint64_t size; /* Size of metadata area */
64
struct raw_locn raw_locns[0]; /* NULL-terminated list */
65
} __attribute__ ((packed));
70
struct metadata_area_ops *file_ops;
71
struct metadata_area_ops *raw_ops;
75
struct device_area area;
76
struct raw_locn rlocn; /* Store inbetween write and commit */
79
/* FIXME Convert this at runtime */
80
#define FMTT_MAGIC "\040\114\126\115\062\040\170\133\065\101\045\162\060\116\052\076"
81
#define FMTT_VERSION 1
82
#define MDA_HEADER_SIZE 512
83
#define LVM2_LABEL "LVM2 001"