Lines Matching defs:zone
70 * Per-Zone storage limit: 60 bits 1 MTB
86 #define HAMMER_OFF_ZONE_MASK 0xF000000000000000ULL /* zone portion */
141 * encode a vol_no. Zone bits are not a part of filesystem capacity as
142 * the zone bits aren't directly or indirectly mapped to physical volumes.
148 * zone 0: available, a big-block that contains the offset is unused
149 * zone 1 (z,v,o): raw volume relative (offset 0 is the volume header)
150 * zone 2 (z,v,o): raw buffer relative (offset 0 is the first buffer)
151 * zone 3 (z,o): undo/redo fifo - fixed zone-2 offset array in volume header
152 * zone 4 (z,v,o): freemap - only real blockmap
153 * zone 8 (z,v,o): B-Tree - actually zone-2 address
154 * zone 9 (z,v,o): meta - actually zone-2 address
155 * zone 10 (z,v,o): large-data - actually zone-2 address
156 * zone 11 (z,v,o): small-data - actually zone-2 address
157 * zone 15: unavailable, usually the offset is beyond volume size
181 * +-------------------------> vol_buf_beg (physical offset of zone-2)
182 * | zone-4 big-block for layer1
184 * | zone-4 big-blocks for layer2
187 * | zone-3 big-blocks for UNDO/REDO FIFO
190 * | zone-8 big-block for root B-Tree node/etc
192 * | zone-9 big-block for root inode/PFS/etc
194 * | zone-X big-blocks
211 * +-------------------------> vol_buf_beg (physical offset of zone-2)
212 * | zone-4 big-blocks for layer2
215 * | zone-X big-blocks
276 #define hammer_is_index_record(zone) \
277 ((zone) >= HAMMER_ZONE_BTREE_INDEX && \
278 (zone) < HAMMER_MAX_ZONES)
283 #define hammer_is_index_direct_xlated(zone) \
284 (((zone) == HAMMER_ZONE_RAW_BUFFER_INDEX) || \
285 ((zone) == HAMMER_ZONE_FREEMAP_INDEX) || \
286 hammer_is_index_record(zone))
291 #define HAMMER_ZONE_ENCODE(zone, ham_off) \
292 (((hammer_off_t)(zone) << 60) | (ham_off))
306 #define HAMMER_ENCODE(zone, vol_no, offset) \
307 (((hammer_off_t)(zone) << 60) | \
320 * Translate a zone address to zone-X address.
322 #define hammer_xlate_to_zoneX(zone, offset) \
323 HAMMER_ZONE_ENCODE((zone), (offset) & ~HAMMER_OFF_ZONE_MASK)
339 * A blockmap is a two-level map which translates a blockmap-backed zone
340 * offset into a raw zone 2 offset. The layer 1 handles 18 bits and the
383 * zone:1 raw volume (no blockmap)
384 * zone:2 raw buffer (no blockmap)
385 * zone:3 undomap (direct layer2 array in volume header)
386 * zone:4 freemap (the only real blockmap)
387 * zone:8-15 zone id used to classify big-block only, address is actually
388 * a zone-2 address.
391 hammer_off_t phys_offset; /* zone-2 offset only used by zone-4 */
392 hammer_off_t first_offset; /* zone-X offset only used by zone-3 */
393 hammer_off_t next_offset; /* zone-X offset for allocation */
394 hammer_off_t alloc_offset; /* zone-X offset only used by zone-3 */
406 * 18+19+23 = 60 bits. The top four bits are the zone id.
409 * All primary data/meta-data zones actually encode a zone-2 address
414 * to a zone:2 (or zone:8-15) address.
416 * zone-X blockmap offset: [zone:4][layer1:18][layer2:19][big-block:23]
422 * which equals bits assigned for layer1 in zone-2 address.
426 hammer_off_t phys_offset; /* UNAVAIL or zone-2 */
439 * which equals bits assigned for layer2 in zone-2 address.
447 uint8_t zone; /* typed allocation zone */
479 * a zone-2 physical offset.
491 * a zone-2 physical offset. Multiply the index by sizeof(blockmap_layer).
512 * header with an array of zone-2 offsets. A maximum of (128x8MB) = 1GB,
619 hammer_off_t undo_offset; /* zone-1,2 offset */
719 * The buffer offset is a physical offset of zone-2 offset. The lower
720 * 52 bits of the zone-2 offset is added to the buffer offset of each
747 * These are relative to block device offset, not zone offsets.
781 hammer_off_t vol0_btree_root; /* B-Tree root offset in zone-8 */
792 * Array of zone-2 addresses for undo FIFO.
821 * Translate a zone-2 address to physical address
827 * Translate a zone-3 address to zone-2 address