Lines Matching full:zone

66  * Per-Zone storage limit: 60 bits		1 MTB
82 #define HAMMER_OFF_ZONE_MASK 0xF000000000000000ULL /* zone portion */
137 * encode a vol_no. Zone bits are not a part of filesystem capacity as
138 * the zone bits aren't directly or indirectly mapped to physical volumes.
144 * zone 0: available, a big-block that contains the offset is unused
145 * zone 1 (z,v,o): raw volume relative (offset 0 is the volume header)
146 * zone 2 (z,v,o): raw buffer relative (offset 0 is the first buffer)
147 * zone 3 (z,o): undo/redo fifo - fixed zone-2 offset array in volume header
148 * zone 4 (z,v,o): freemap - only real blockmap
149 * zone 8 (z,v,o): B-Tree - actually zone-2 address
150 * zone 9 (z,v,o): meta - actually zone-2 address
151 * zone 10 (z,v,o): large-data - actually zone-2 address
152 * zone 11 (z,v,o): small-data - actually zone-2 address
153 * zone 15: unavailable, usually the offset is beyond volume size
177 * +-------------------------> vol_buf_beg (physical offset of zone-2)
178 * | zone-4 big-block for layer1
180 * | zone-4 big-blocks for layer2
183 * | zone-3 big-blocks for UNDO/REDO FIFO
186 * | zone-8 big-block for root B-Tree node/etc
188 * | zone-9 big-block for root inode/PFS/etc
190 * | zone-X big-blocks
207 * +-------------------------> vol_buf_beg (physical offset of zone-2)
208 * | zone-4 big-blocks for layer2
211 * | zone-X big-blocks
272 #define hammer_is_index_record(zone) \ argument
273 ((zone) >= HAMMER_ZONE_BTREE_INDEX && \
274 (zone) < HAMMER_MAX_ZONES)
279 #define hammer_is_index_direct_xlated(zone) \ argument
280 (((zone) == HAMMER_ZONE_RAW_BUFFER_INDEX) || \
281 ((zone) == HAMMER_ZONE_FREEMAP_INDEX) || \
282 hammer_is_index_record(zone))
287 #define HAMMER_ZONE_ENCODE(zone, ham_off) \ argument
288 (((hammer_off_t)(zone) << 60) | (ham_off))
302 #define HAMMER_ENCODE(zone, vol_no, offset) \ argument
303 (((hammer_off_t)(zone) << 60) | \
316 * Translate a zone address to zone-X address.
318 #define hammer_xlate_to_zoneX(zone, offset) \ argument
319 HAMMER_ZONE_ENCODE((zone), (offset) & ~HAMMER_OFF_ZONE_MASK)
335 * A blockmap is a two-level map which translates a blockmap-backed zone
336 * offset into a raw zone 2 offset. The layer 1 handles 18 bits and the
379 * zone:1 raw volume (no blockmap)
380 * zone:2 raw buffer (no blockmap)
381 * zone:3 undomap (direct layer2 array in volume header)
382 * zone:4 freemap (the only real blockmap)
383 * zone:8-15 zone id used to classify big-block only, address is actually
384 * a zone-2 address.
387 hammer_off_t phys_offset; /* zone-2 offset only used by zone-4 */
388 hammer_off_t first_offset; /* zone-X offset only used by zone-3 */
389 hammer_off_t next_offset; /* zone-X offset for allocation */
390 hammer_off_t alloc_offset; /* zone-X offset only used by zone-3 */
402 * 18+19+23 = 60 bits. The top four bits are the zone id.
405 * All primary data/meta-data zones actually encode a zone-2 address
410 * to a zone:2 (or zone:8-15) address.
412 * zone-X blockmap offset: [zone:4][layer1:18][layer2:19][big-block:23]
418 * which equals bits assigned for layer1 in zone-2 address.
422 hammer_off_t phys_offset; /* UNAVAIL or zone-2 */
435 * which equals bits assigned for layer2 in zone-2 address.
443 uint8_t zone; /* typed allocation zone */ member
475 * a zone-2 physical offset.
487 * a zone-2 physical offset. Multiply the index by sizeof(blockmap_layer).
508 * header with an array of zone-2 offsets. A maximum of (128x8MB) = 1GB,
615 hammer_off_t undo_offset; /* zone-1,2 offset */
715 * The buffer offset is a physical offset of zone-2 offset. The lower
716 * 52 bits of the zone-2 offset is added to the buffer offset of each
743 * These are relative to block device offset, not zone offsets.
777 hammer_off_t vol0_btree_root; /* B-Tree root offset in zone-8 */
788 * Array of zone-2 addresses for undo FIFO.
817 * Translate a zone-2 address to physical address
823 * Translate a zone-3 address to zone-2 address