BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / file_systems / udf / MetadataPartition.h
blob030ca0db12d651a6e47b685a6be4631edf0c322a
1 /*
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.
5 */
6 #ifndef _UDF_METADATA_PARTITION_H
7 #define _UDF_METADATA_PARTITION_H
9 /*! \file MetadataPartition.h
12 #include <util/kernel_cpp.h>
14 #include "UdfDebug.h"
15 #include "Volume.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 {
26 public:
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);
34 status_t InitCheck();
36 uint32 AllocationUnitSize() const { return fAllocationUnitSize; }
37 uint16 AlignmentUnitSize() const { return fAlignmentUnitSize; }
38 uint32 MetadataIsDuplicated() const { return fMetadataIsDuplicated; }
39 private:
40 uint16 fPartition;
41 Partition &fParentPartition;
42 uint32 fAllocationUnitSize;
43 uint16 fAlignmentUnitSize;
44 bool fMetadataIsDuplicated;
45 status_t fInitStatus;
46 Icb *fMetadataIcb;
47 Icb *fMetadataMirrorIcb;
50 #endif // _UDF_METADATA_PARTITION_H