linux/block/partitions/ldm.h

// SPDX-License-Identifier: GPL-2.0-or-later
/**
 * ldm - Part of the Linux-NTFS project.
 *
 * Copyright (C) 2001,2002 Richard Russon <[email protected]>
 * Copyright (c) 2001-2007 Anton Altaparmakov
 * Copyright (C) 2001,2002 Jakob Kemi <[email protected]>
 *
 * Documentation is available at http://www.linux-ntfs.org/doku.php?id=downloads 
 */

#ifndef _FS_PT_LDM_H_
#define _FS_PT_LDM_H_

#include <linux/types.h>
#include <linux/list.h>
#include <linux/fs.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>

struct parsed_partitions;

/* Magic numbers in CPU format. */
#define MAGIC_VMDB
#define MAGIC_VBLK
#define MAGIC_PRIVHEAD
#define MAGIC_TOCBLOCK

/* The defined vblk types. */
#define VBLK_VOL5
#define VBLK_CMP3
#define VBLK_PRT3
#define VBLK_DSK3
#define VBLK_DSK4
#define VBLK_DGR3
#define VBLK_DGR4

/* vblk flags indicating extra information will be present */
#define VBLK_FLAG_COMP_STRIPE
#define VBLK_FLAG_PART_INDEX
#define VBLK_FLAG_DGR3_IDS
#define VBLK_FLAG_DGR4_IDS
#define VBLK_FLAG_VOLU_ID1
#define VBLK_FLAG_VOLU_ID2
#define VBLK_FLAG_VOLU_SIZE
#define VBLK_FLAG_VOLU_DRIVE

/* size of a vblk's static parts */
#define VBLK_SIZE_HEAD
#define VBLK_SIZE_CMP3
#define VBLK_SIZE_DGR3
#define VBLK_SIZE_DGR4
#define VBLK_SIZE_DSK3
#define VBLK_SIZE_DSK4
#define VBLK_SIZE_PRT3
#define VBLK_SIZE_VOL5

/* component types */
#define COMP_STRIPE
#define COMP_BASIC
#define COMP_RAID

/* Other constants. */
#define LDM_DB_SIZE

#define OFF_PRIV1

/* Offsets to structures within the LDM Database in sectors. */
#define OFF_PRIV2
#define OFF_PRIV3

#define OFF_TOCB1
#define OFF_TOCB2
#define OFF_TOCB3
#define OFF_TOCB4

#define OFF_VMDB

#define LDM_PARTITION

#define TOC_BITMAP1
#define TOC_BITMAP2

struct frag {};

/* In memory LDM database structures. */

struct privhead {};

struct tocblock {};

struct vmdb {};

struct vblk_comp {};

struct vblk_dgrp {};

struct vblk_disk {};

struct vblk_part {};

struct vblk_volu {};

struct vblk_head {};

struct vblk {};

struct ldmdb {};

#endif /* _FS_PT_LDM_H_ */