Class: Lvm2Thin::MappingTree
- Defined in:
- lib/VolumeManager/LVM/thin/mapping_tree.rb
Constant Summary
Constants inherited from BTree
Instance Attribute Summary
Attributes inherited from BTree
Instance Method Summary collapse
- #entries ⇒ Object
-
#initialize(superblock, root_address) ⇒ MappingTree
constructor
A new instance of MappingTree.
- #map_for(device_id) ⇒ Object
Methods inherited from BTree
#[], #entry_for, #internal?, #key_address, #key_base, #keys, #leaf?, #max_entries, #num_entries, #root, #to_h, #value_address, #value_base
Constructor Details
#initialize(superblock, root_address) ⇒ MappingTree
Returns a new instance of MappingTree.
3 4 5 |
# File 'lib/VolumeManager/LVM/thin/mapping_tree.rb', line 3 def initialize(superblock, root_address) super superblock, root_address, MAPPING_DETAILS end |
Instance Method Details
#entries ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/VolumeManager/LVM/thin/mapping_tree.rb', line 7 def entries @mtentries ||= begin super.collect do |entry| DataMap.new @superblock, @superblock.md_block_address(entry['value']) end end end |
#map_for(device_id) ⇒ Object
15 16 17 |
# File 'lib/VolumeManager/LVM/thin/mapping_tree.rb', line 15 def map_for(device_id) entry_for(device_id) end |