|
Packit Service |
310c69 |
/*
|
|
Packit Service |
310c69 |
* Copyright (c) 2020 Red Hat, Inc.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is free software; you can redistribute it and/or
|
|
Packit Service |
310c69 |
* modify it under the terms of the GNU General Public License
|
|
Packit Service |
310c69 |
* as published by the Free Software Foundation; either version 2
|
|
Packit Service |
310c69 |
* of the License, or (at your option) any later version.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is distributed in the hope that it will be useful,
|
|
Packit Service |
310c69 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
310c69 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
310c69 |
* GNU General Public License for more details.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* You should have received a copy of the GNU General Public License
|
|
Packit Service |
310c69 |
* along with this program; if not, write to the Free Software
|
|
Packit Service |
310c69 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
310c69 |
* 02110-1301, USA.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* $Id: //eng/uds-releases/jasper/src/uds/layoutRegion.h#1 $
|
|
Packit Service |
310c69 |
*/
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#ifndef LAYOUT_REGION_H
|
|
Packit Service |
310c69 |
#define LAYOUT_REGION_H
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Single file layouts are defined in terms of data regions. Each data region
|
|
Packit Service |
310c69 |
* is a sub-section of the available space. Some data regions may contain
|
|
Packit Service |
310c69 |
* subsidiary data regions, for example, a checkpoint or index save will
|
|
Packit Service |
310c69 |
* contain master index regions (according to the number of zones), an
|
|
Packit Service |
310c69 |
* index page map region, and possibly an open chapter region.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static const uint64_t REGION_MAGIC = 0x416c6252676e3031; // 'AlbRgn01'
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
typedef struct regionHeader {
|
|
Packit Service |
310c69 |
uint64_t magic; // REGION_MAGIC
|
|
Packit Service |
310c69 |
uint64_t regionBlocks; // size of whole region
|
|
Packit Service |
310c69 |
uint16_t type; // RH_TYPE_...
|
|
Packit Service |
310c69 |
uint16_t version; // 1
|
|
Packit Service |
310c69 |
uint16_t numRegions; // number of layouts in the table
|
|
Packit Service |
310c69 |
uint16_t payload; // extra data beyond region table
|
|
Packit Service |
310c69 |
} RegionHeader;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
typedef struct layoutRegion {
|
|
Packit Service |
310c69 |
uint64_t startBlock;
|
|
Packit Service |
310c69 |
uint64_t numBlocks;
|
|
Packit Service |
310c69 |
uint32_t checksum; // only used for save regions
|
|
Packit Service |
310c69 |
uint16_t kind;
|
|
Packit Service |
310c69 |
uint16_t instance;
|
|
Packit Service |
310c69 |
} LayoutRegion;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
typedef struct regionTable {
|
|
Packit Service |
310c69 |
RegionHeader header;
|
|
Packit Service |
310c69 |
LayoutRegion regions[];
|
|
Packit Service |
310c69 |
} RegionTable;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#endif // LAYOUT_REGION_H
|