1 //---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS license. 4 // 5 // Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net 6 //--------------------------------------------------------------------- 7 #ifndef _UDF_METADATA_PARTITION_H 8 #define _UDF_METADATA_PARTITION_H 9 10 /*! \file MetadataPartition.h 11 */ 12 13 #include <kernel_cpp.h> 14 15 #include "Partition.h" 16 #include "UdfDebug.h" 17 18 namespace Udf { 19 20 /*! \brief Type 2 metadata partition 21 22 Metadata partitions allow for clustering of metadata (ICBs, directory 23 contents, etc.) and also provide the option of metadata duplication. 24 25 See also UDF-2.50 2.2.10, UDF-2.50 2.2.13 26 */ 27 class MetadataPartition : public Partition { 28 public: 29 MetadataPartition(Partition &parentPartition, uint32 metadataFileLocation, 30 uint32 metadataMirrorFileLocation, uint32 metadataBitmapFileLocation, 31 uint32 allocationUnitSize, uint16 alignmentUnitSize, 32 bool metadataIsDuplicated); 33 virtual ~MetadataPartition(); 34 virtual status_t MapBlock(uint32 logicalBlock, off_t &physicalBlock); 35 36 status_t InitCheck(); 37 38 uint32 AllocationUnitSize() const { return fAllocationUnitSize; } 39 uint16 AlignmentUnitSize() const { return fAlignmentUnitSize; } 40 uint32 MetadataIsDuplicated() const { return fMetadataIsDuplicated; } 41 private: 42 Partition &fParentPartition; 43 uint32 fAllocationUnitSize; 44 uint16 fAlignmentUnitSize; 45 bool fMetadataIsDuplicated; 46 status_t fInitStatus; 47 }; 48 49 }; // namespace Udf 50 51 #endif // _UDF_METADATA_PARTITION_H 52