2 * Copyright 2012, Jérôme Duval, korli@users.berlios.de.
3 * Copyright 2003 Tyler Dauwalder, tyler@dauwalder.net
4 * This file may be used under the terms of the MIT License.
6 #ifndef _UDF_METADATA_PARTITION_H
7 #define _UDF_METADATA_PARTITION_H
9 /*! \file MetadataPartition.h
12 #include <util/kernel_cpp.h>
18 /*! \brief Type 2 metadata partition
20 Metadata partitions allow for clustering of metadata (ICBs, directory
21 contents, etc.) and also provide the option of metadata duplication.
23 See also UDF-2.50 2.2.10, UDF-2.50 2.2.13
25 class MetadataPartition
: public Partition
{
27 MetadataPartition(Volume
*volume
, uint16 partition
, Partition
&parentPartition
,
28 uint32 metadataFileLocation
, uint32 metadataMirrorFileLocation
,
29 uint32 metadataBitmapFileLocation
, uint32 allocationUnitSize
,
30 uint16 alignmentUnitSize
, bool metadataIsDuplicated
);
31 virtual ~MetadataPartition();
32 virtual status_t
MapBlock(uint32 logicalBlock
, off_t
&physicalBlock
);
36 uint32
AllocationUnitSize() const { return fAllocationUnitSize
; }
37 uint16
AlignmentUnitSize() const { return fAlignmentUnitSize
; }
38 uint32
MetadataIsDuplicated() const { return fMetadataIsDuplicated
; }
41 Partition
&fParentPartition
;
42 uint32 fAllocationUnitSize
;
43 uint16 fAlignmentUnitSize
;
44 bool fMetadataIsDuplicated
;
47 Icb
*fMetadataMirrorIcb
;
50 #endif // _UDF_METADATA_PARTITION_H