BTRFS: Node now holding Volume instead of cache to retrieve more values
[haiku.git] / src / add-ons / kernel / file_systems / btrfs / Chunk.h
blobc1fbe4941a34ddc4ae332622804729bd56a513d3
1 /*
2 * Copyright 2011, Haiku Inc. All rights reserved.
3 * This file may be used under the terms of the MIT License.
5 * Authors:
6 * Jérôme Duval
7 */
8 #ifndef CHUNK_H
9 #define CHUNK_H
12 #include "btrfs.h"
15 class Chunk {
16 public:
17 Chunk(btrfs_chunk* chunk,
18 fsblock_t offset);
19 ~Chunk();
20 uint32 Size() const;
21 status_t FindBlock(off_t logical, off_t& physical);
22 fsblock_t Offset() const { return fChunkOffset; }
23 fsblock_t End() const
24 { return fChunkOffset + fChunk->Length(); }
25 private:
26 btrfs_chunk* fChunk;
27 fsblock_t fChunkOffset;
28 status_t fInitStatus;
31 #endif // CHUNK_H