|
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/vdo-releases/aluminum/src/c++/vdo/base/types.h#14 $
|
|
Packit Service |
310c69 |
*/
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#ifndef TYPES_H
|
|
Packit Service |
310c69 |
#define TYPES_H
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#include "blockMappingState.h"
|
|
Packit Service |
310c69 |
#include "common.h"
|
|
Packit Service |
310c69 |
#include "statusCodes.h"
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A size type in blocks.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint64_t BlockCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The size of a block.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint16_t BlockSize;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A count of compressed fragments
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint8_t CompressedFragmentCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A CRC-32 checksum
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint32_t CRC32Checksum;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A height within a tree.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint8_t Height;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The logical block number as used by the consumer.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint64_t LogicalBlockNumber;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The type of the nonce used to identify instances of VDO.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint64_t Nonce;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A size in pages.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint32_t PageCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A page number.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint32_t PageNumber;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The size of a page. Must be evenly divisible by block size.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint32_t PageSize;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The physical (well, less logical) block number at which the block is found
|
|
Packit Service |
310c69 |
* on the underlying device.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint64_t PhysicalBlockNumber;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A release version number. These numbers are used to make the numbering
|
|
Packit Service |
310c69 |
* space for component versions independent across release branches.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* Really an enum, but we have to specify the size for encoding; see
|
|
Packit Service |
310c69 |
* releaseVersions.h for the enumeration values.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint32_t ReleaseVersionNumber;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A count of tree roots.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint8_t RootCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A number of sectors.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint8_t SectorCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A sequence number.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint64_t SequenceNumber;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A size type in slabs.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint16_t SlabCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A slot in a bin or block map page.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint16_t SlotNumber;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A number of VIOs.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint16_t VIOCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A VDO thread configuration.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct threadConfig ThreadConfig;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A thread counter
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint8_t ThreadCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A thread ID
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* Base-code threads are numbered sequentially starting from 0.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint8_t ThreadID;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The thread ID returned when the current base code thread ID cannot be found
|
|
Packit Service |
310c69 |
* or is otherwise undefined.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
static const ThreadID INVALID_THREAD_ID = (ThreadID) -1;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A zone counter
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef uint8_t ZoneCount;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The type of request a VIO is performing
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef enum __attribute__((packed)) vioOperation {
|
|
Packit Service |
310c69 |
VIO_UNSPECIFIED_OPERATION = 0,
|
|
Packit Service |
310c69 |
VIO_READ = 1,
|
|
Packit Service |
310c69 |
VIO_WRITE = 2,
|
|
Packit Service |
310c69 |
VIO_READ_MODIFY_WRITE = VIO_READ | VIO_WRITE,
|
|
Packit Service |
310c69 |
VIO_READ_WRITE_MASK = VIO_READ_MODIFY_WRITE,
|
|
Packit Service |
310c69 |
VIO_FLUSH_BEFORE = 4,
|
|
Packit Service |
310c69 |
VIO_FLUSH_AFTER = 8,
|
|
Packit Service |
310c69 |
} VIOOperation;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* VIO types for statistics and instrumentation.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef enum __attribute__((packed)) {
|
|
Packit Service |
310c69 |
VIO_TYPE_UNINITIALIZED = 0,
|
|
Packit Service |
310c69 |
VIO_TYPE_DATA,
|
|
Packit Service |
310c69 |
VIO_TYPE_BLOCK_ALLOCATOR,
|
|
Packit Service |
310c69 |
VIO_TYPE_BLOCK_MAP,
|
|
Packit Service |
310c69 |
VIO_TYPE_BLOCK_MAP_INTERIOR,
|
|
Packit Service |
310c69 |
VIO_TYPE_COMPRESSED_BLOCK,
|
|
Packit Service |
310c69 |
VIO_TYPE_PARTITION_COPY,
|
|
Packit Service |
310c69 |
VIO_TYPE_RECOVERY_JOURNAL,
|
|
Packit Service |
310c69 |
VIO_TYPE_SLAB_JOURNAL,
|
|
Packit Service |
310c69 |
VIO_TYPE_SLAB_SUMMARY,
|
|
Packit Service |
310c69 |
VIO_TYPE_SUPER_BLOCK,
|
|
Packit Service |
310c69 |
VIO_TYPE_TEST,
|
|
Packit Service |
310c69 |
} VIOType;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The current operation on a physical block (from the point of view of the
|
|
Packit Service |
310c69 |
* recovery journal, slab journals, and reference counts.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef enum __attribute__((packed)) {
|
|
Packit Service |
310c69 |
DATA_DECREMENT = 0,
|
|
Packit Service |
310c69 |
DATA_INCREMENT = 1,
|
|
Packit Service |
310c69 |
BLOCK_MAP_DECREMENT = 2,
|
|
Packit Service |
310c69 |
BLOCK_MAP_INCREMENT = 3,
|
|
Packit Service |
310c69 |
} JournalOperation;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Partition IDs are encoded in the volume layout in the super block.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef enum __attribute__((packed)) {
|
|
Packit Service |
310c69 |
BLOCK_MAP_PARTITION = 0,
|
|
Packit Service |
310c69 |
BLOCK_ALLOCATOR_PARTITION = 1,
|
|
Packit Service |
310c69 |
RECOVERY_JOURNAL_PARTITION = 2,
|
|
Packit Service |
310c69 |
SLAB_SUMMARY_PARTITION = 3,
|
|
Packit Service |
310c69 |
} PartitionID;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Check whether a VIOType is for servicing an external data request.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param vioType The VIOType to check
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
static inline bool isDataVIOType(VIOType vioType)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
return (vioType == VIO_TYPE_DATA);
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Check whether a VIOType is for compressed block writes
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param vioType The VIOType to check
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
static inline bool isCompressedWriteVIOType(VIOType vioType)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
return (vioType == VIO_TYPE_COMPRESSED_BLOCK);
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Check whether a VIOType is for metadata
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param vioType The VIOType to check
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
static inline bool isMetadataVIOType(VIOType vioType)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
return ((vioType != VIO_TYPE_UNINITIALIZED)
|
|
Packit Service |
310c69 |
&& !isDataVIOType(vioType)
|
|
Packit Service |
310c69 |
&& !isCompressedWriteVIOType(vioType));
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Priority levels for asynchronous I/O operations performed on a VIO.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef enum __attribute__((packed)) vioPriority {
|
|
Packit Service |
310c69 |
VIO_PRIORITY_LOW = 0,
|
|
Packit Service |
310c69 |
VIO_PRIORITY_DATA = VIO_PRIORITY_LOW,
|
|
Packit Service |
310c69 |
VIO_PRIORITY_COMPRESSED_DATA = VIO_PRIORITY_DATA,
|
|
Packit Service |
310c69 |
VIO_PRIORITY_METADATA,
|
|
Packit Service |
310c69 |
VIO_PRIORITY_HIGH,
|
|
Packit Service |
310c69 |
} VIOPriority;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Metadata types for the VDO.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef enum __attribute__((packed)) {
|
|
Packit Service |
310c69 |
VDO_METADATA_RECOVERY_JOURNAL = 1,
|
|
Packit Service |
310c69 |
VDO_METADATA_SLAB_JOURNAL,
|
|
Packit Service |
310c69 |
} VDOMetadataType;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The possible write policy values.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef enum {
|
|
Packit Service |
310c69 |
WRITE_POLICY_SYNC, ///< All writes are synchronous, i. e., they
|
|
Packit Service |
310c69 |
///< are acknowledged only when the data is
|
|
Packit Service |
310c69 |
///< written to stable storage.
|
|
Packit Service |
310c69 |
WRITE_POLICY_ASYNC, ///< Writes are acknowledged when the data is
|
|
Packit Service |
310c69 |
///< cached for writing to stable storage, subject
|
|
Packit Service |
310c69 |
///< to resiliency guarantees specified elsewhere.
|
|
Packit Service |
310c69 |
///< After a crash, the data will be either old or
|
|
Packit Service |
310c69 |
///< new value for unflushed writes, never garbage.
|
|
Packit Service |
310c69 |
WRITE_POLICY_ASYNC_UNSAFE, ///< Writes are acknowledged when the data is
|
|
Packit Service |
310c69 |
///< cached for writing to stable storage, subject
|
|
Packit Service |
310c69 |
///< to resiliency guarantees specified elsewhere.
|
|
Packit Service |
310c69 |
WRITE_POLICY_AUTO, ///< The appropriate policy is chosen based on the
|
|
Packit Service |
310c69 |
///< underlying device
|
|
Packit Service |
310c69 |
} WritePolicy;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
typedef enum {
|
|
Packit Service |
310c69 |
ZONE_TYPE_ADMIN,
|
|
Packit Service |
310c69 |
ZONE_TYPE_JOURNAL,
|
|
Packit Service |
310c69 |
ZONE_TYPE_LOGICAL,
|
|
Packit Service |
310c69 |
ZONE_TYPE_PHYSICAL,
|
|
Packit Service |
310c69 |
} ZoneType;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A position in the block map where a block map entry is stored.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct {
|
|
Packit Service |
310c69 |
PhysicalBlockNumber pbn;
|
|
Packit Service |
310c69 |
SlotNumber slot;
|
|
Packit Service |
310c69 |
} BlockMapSlot;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A position in the arboreal block map at a specific level.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct {
|
|
Packit Service |
310c69 |
PageNumber pageIndex;
|
|
Packit Service |
310c69 |
BlockMapSlot blockMapSlot;
|
|
Packit Service |
310c69 |
} BlockMapTreeSlot;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The configuration of a single slab derived from the configured block size
|
|
Packit Service |
310c69 |
* and slab size.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct slabConfig {
|
|
Packit Service |
310c69 |
BlockCount slabBlocks; ///< total number of blocks in the slab
|
|
Packit Service |
310c69 |
BlockCount dataBlocks; ///< number of blocks available for data
|
|
Packit Service |
310c69 |
BlockCount referenceCountBlocks; ///< number of blocks for refCounts
|
|
Packit Service |
310c69 |
BlockCount slabJournalBlocks; ///< number of blocks for the slab journal
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Number of blocks after which the slab journal starts pushing out a
|
|
Packit Service |
310c69 |
* ReferenceBlock for each new entry it receives.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
BlockCount slabJournalFlushingThreshold;
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Number of blocks after which the slab journal pushes out all
|
|
Packit Service |
310c69 |
* ReferenceBlocks and makes all VIOs wait.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
BlockCount slabJournalBlockingThreshold;
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Number of blocks after which the slab must be scrubbed before coming
|
|
Packit Service |
310c69 |
* online.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
BlockCount slabJournalScrubbingThreshold;
|
|
Packit Service |
310c69 |
} __attribute__((packed)) SlabConfig;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The configuration of the VDO service.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct vdoConfig {
|
|
Packit Service |
310c69 |
BlockCount logicalBlocks; ///< number of logical blocks
|
|
Packit Service |
310c69 |
BlockCount physicalBlocks; ///< number of physical blocks
|
|
Packit Service |
310c69 |
BlockCount slabSize; ///< number of blocks in a slab
|
|
Packit Service |
310c69 |
BlockCount recoveryJournalSize; ///< number of recovery journal blocks
|
|
Packit Service |
310c69 |
BlockCount slabJournalBlocks; ///< number of slab journal blocks
|
|
Packit Service |
310c69 |
} __attribute__((packed)) VDOConfig;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* The configuration parameters of the VDO service specified at load time.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct vdoLoadConfig {
|
|
Packit Service |
310c69 |
/** the offset on the physical layer where the VDO begins */
|
|
Packit Service |
310c69 |
PhysicalBlockNumber firstBlockOffset;
|
|
Packit Service |
310c69 |
/** the expected release version number of the VDO */
|
|
Packit Service |
310c69 |
ReleaseVersionNumber releaseVersion;
|
|
Packit Service |
310c69 |
/** the expected nonce of the VDO */
|
|
Packit Service |
310c69 |
Nonce nonce;
|
|
Packit Service |
310c69 |
/** the thread configuration of the VDO */
|
|
Packit Service |
310c69 |
ThreadConfig *threadConfig;
|
|
Packit Service |
310c69 |
/** the page cache size, in pages */
|
|
Packit Service |
310c69 |
PageCount cacheSize;
|
|
Packit Service |
310c69 |
/** whether writes are synchronous */
|
|
Packit Service |
310c69 |
WritePolicy writePolicy;
|
|
Packit Service |
310c69 |
/** the maximum age of a dirty block map page in recovery journal blocks */
|
|
Packit Service |
310c69 |
BlockCount maximumAge;
|
|
Packit Service |
310c69 |
} VDOLoadConfig;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Forward declarations of abstract types
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct actionManager ActionManager;
|
|
Packit Service |
310c69 |
typedef struct allocatingVIO AllocatingVIO;
|
|
Packit Service |
310c69 |
typedef struct allocationSelector AllocationSelector;
|
|
Packit Service |
310c69 |
typedef struct blockAllocator BlockAllocator;
|
|
Packit Service |
310c69 |
typedef struct blockMap BlockMap;
|
|
Packit Service |
310c69 |
typedef struct blockMapTreeZone BlockMapTreeZone;
|
|
Packit Service |
310c69 |
typedef struct blockMapZone BlockMapZone;
|
|
Packit Service |
310c69 |
typedef struct dataVIO DataVIO;
|
|
Packit Service |
310c69 |
typedef struct flusher Flusher;
|
|
Packit Service |
310c69 |
typedef struct forest Forest;
|
|
Packit Service |
310c69 |
typedef struct hashLock HashLock;
|
|
Packit Service |
310c69 |
typedef struct hashZone HashZone;
|
|
Packit Service |
310c69 |
typedef struct indexConfig IndexConfig;
|
|
Packit Service |
310c69 |
typedef struct inputBin InputBin;
|
|
Packit Service |
310c69 |
typedef struct lbnLock LBNLock;
|
|
Packit Service |
310c69 |
typedef struct lockCounter LockCounter;
|
|
Packit Service |
310c69 |
typedef struct logicalZone LogicalZone;
|
|
Packit Service |
310c69 |
typedef struct logicalZones LogicalZones;
|
|
Packit Service |
310c69 |
typedef struct pbnLock PBNLock;
|
|
Packit Service |
310c69 |
typedef struct physicalLayer PhysicalLayer;
|
|
Packit Service |
310c69 |
typedef struct physicalZone PhysicalZone;
|
|
Packit Service |
310c69 |
typedef struct recoveryJournal RecoveryJournal;
|
|
Packit Service |
310c69 |
typedef struct readOnlyNotifier ReadOnlyNotifier;
|
|
Packit Service |
310c69 |
typedef struct refCounts RefCounts;
|
|
Packit Service |
310c69 |
typedef struct vdoSlab Slab;
|
|
Packit Service |
310c69 |
typedef struct slabDepot SlabDepot;
|
|
Packit Service |
310c69 |
typedef struct slabJournal SlabJournal;
|
|
Packit Service |
310c69 |
typedef struct slabJournalEntry SlabJournalEntry;
|
|
Packit Service |
310c69 |
typedef struct slabScrubber SlabScrubber;
|
|
Packit Service |
310c69 |
typedef struct slabSummary SlabSummary;
|
|
Packit Service |
310c69 |
typedef struct slabSummaryZone SlabSummaryZone;
|
|
Packit Service |
310c69 |
typedef struct vdo VDO;
|
|
Packit Service |
310c69 |
typedef struct vdoCompletion VDOCompletion;
|
|
Packit Service |
310c69 |
typedef struct vdoExtent VDOExtent;
|
|
Packit Service |
310c69 |
typedef struct vdoFlush VDOFlush;
|
|
Packit Service |
310c69 |
typedef struct vdoLayout VDOLayout;
|
|
Packit Service |
310c69 |
typedef struct vdoStatistics VDOStatistics;
|
|
Packit Service |
310c69 |
typedef struct vio VIO;
|
|
Packit Service |
310c69 |
typedef struct vioPool VIOPool;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
typedef struct {
|
|
Packit Service |
310c69 |
PhysicalBlockNumber pbn;
|
|
Packit Service |
310c69 |
BlockMappingState state;
|
|
Packit Service |
310c69 |
} DataLocation;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
typedef struct {
|
|
Packit Service |
310c69 |
PhysicalBlockNumber pbn;
|
|
Packit Service |
310c69 |
BlockMappingState state;
|
|
Packit Service |
310c69 |
PhysicalZone *zone;
|
|
Packit Service |
310c69 |
} ZonedPBN;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Callback which will be called by the VDO when all of the VIOs in the
|
|
Packit Service |
310c69 |
* extent have been processed.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param extent The extent which is complete
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef void VDOExtentCallback(VDOExtent *extent);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* An asynchronous operation.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param vio The VIO on which to operate
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef void AsyncOperation(VIO *vio);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* An asynchronous compressed write operation.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param allocatingVIO The AllocatingVIO to write
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef void CompressedWriter(AllocatingVIO *allocatingVIO);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* An asynchronous data operation.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param dataVIO The DataVIO on which to operate
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef void AsyncDataOperation(DataVIO *dataVIO);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* A reference to a completion which (the reference) can be enqueued
|
|
Packit Service |
310c69 |
* for completion on a specified thread.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
typedef struct enqueueable {
|
|
Packit Service |
310c69 |
VDOCompletion *completion;
|
|
Packit Service |
310c69 |
} Enqueueable;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#endif // TYPES_H
|