Lines Matching +full:1 +full:kb
12 * 1. Redistributions of source code must retain the above copyright
76 * are always 64KB. Logical file buffers are typically 16KB. All data
85 * to optimize storage efficiency. The minimum fragment size is 1KB.
94 * A full indirect block use supports 512 x 128-byte blockrefs in a 64KB
95 * buffer. Indirect blocks down to 1KB are supported to keep small
98 * A maximally sized file (2^64-1 bytes) requires ~6 indirect block levels
99 * using 64KB indirect blocks (128 byte refs, 512 or radix 9 per indblk).
117 * NOTE: Should not be larger than 1K since inodes
118 * are 1K.
132 #define HAMMER2_SEGSIZE (1 << HAMMER2_FREEMAP_LEVEL0_RADIX)
135 #define HAMMER2_PBUFRADIX 16 /* physical buf (1<<16) bytes */
137 #define HAMMER2_LBUFRADIX 14 /* logical buf (1<<14) bytes */
165 * <= 512KB. Up to 4 directory entries can be referenced from a directory
168 * Indirect blocks are typically either 4KB (64 blockrefs / ~4MB represented),
169 * or 64KB (1024 blockrefs / ~64MB represented).
172 #define HAMMER2_SET_COUNT (1 << HAMMER2_SET_RADIX)
176 #define HAMMER2_PBUFMASK (HAMMER2_PBUFSIZE - 1)
177 #define HAMMER2_LBUFMASK (HAMMER2_LBUFSIZE - 1)
178 #define HAMMER2_SEGMASK (HAMMER2_SEGSIZE - 1)
192 * freemap is reserved at the beginning of every 1GB.
198 * 1 freemap00 level1 FREEMAP_LEAF (256 x 128B bitmap data per 1GB)
247 * Note that each FREEMAP_LEAF or FREEMAP_NODE uses 32KB out of 64KB slot.
251 * The freemap utilizes blocks #1-40 in 8 sets of 5 blocks. Each block in
260 * Each freemap set is 5 x 64K blocks and represents the 1GB, 256GB, 64TB,
265 * The Level 0 64KB block represents 1GB of storage represented by 32KB
267 * and has a 512 bit bitmap, using 2 bits to represent a 16KB chunk of
275 * One important thing to note here is that the freemap resolution is 16KB,
276 * but the minimum storage allocation size is 1KB. The hammer2 vfs keeps
278 * the entire 16KB of a partially allocated block will be considered fully
292 * WARNING! ZONE_SEG and VOLUME_ALIGN must be a multiple of 1<<LEVEL0_RADIX
297 * (1) Modifications to freemap blocks 'allocate' a new copy (aka use a block
303 #define HAMMER2_VOLUME_ALIGNMASK (HAMMER2_VOLUME_ALIGN - 1)
308 #define HAMMER2_NEWFS_ALIGNMASK (HAMMER2_VOLUME_ALIGN - 1)
312 #define HAMMER2_ZONE_MASK64 (HAMMER2_ZONE_BYTES64 - 1)
320 #define HAMMER2_ZONE_FREEMAP_00 1 /* normal freemap rotation */
358 #define HAMMER2_ZONEFM_LEVEL1 0 /* 1GB leafmap */
359 #define HAMMER2_ZONEFM_LEVEL2 1 /* 256GB indmap */
367 * 32KB indirect block for freemap (LEVELN_PSIZE below).
370 * bitmap, 2-bits per entry. So course bitmap item represents 16KB.
380 #define HAMMER2_FREEMAP_LEVEL1_RADIX 30 /* 1GB */
381 #define HAMMER2_FREEMAP_LEVEL0_RADIX 22 /* 4MB (128by in l-1 leaf) */
385 #define HAMMER2_FREEMAP_LEVEL5_SIZE ((hammer2_off_t)1 << \
387 #define HAMMER2_FREEMAP_LEVEL4_SIZE ((hammer2_off_t)1 << \
389 #define HAMMER2_FREEMAP_LEVEL3_SIZE ((hammer2_off_t)1 << \
391 #define HAMMER2_FREEMAP_LEVEL2_SIZE ((hammer2_off_t)1 << \
393 #define HAMMER2_FREEMAP_LEVEL1_SIZE ((hammer2_off_t)1 << \
395 #define HAMMER2_FREEMAP_LEVEL0_SIZE ((hammer2_off_t)1 << \
398 #define HAMMER2_FREEMAP_LEVEL5_MASK (HAMMER2_FREEMAP_LEVEL5_SIZE - 1)
399 #define HAMMER2_FREEMAP_LEVEL4_MASK (HAMMER2_FREEMAP_LEVEL4_SIZE - 1)
400 #define HAMMER2_FREEMAP_LEVEL3_MASK (HAMMER2_FREEMAP_LEVEL3_SIZE - 1)
401 #define HAMMER2_FREEMAP_LEVEL2_MASK (HAMMER2_FREEMAP_LEVEL2_SIZE - 1)
402 #define HAMMER2_FREEMAP_LEVEL1_MASK (HAMMER2_FREEMAP_LEVEL1_SIZE - 1)
403 #define HAMMER2_FREEMAP_LEVEL0_MASK (HAMMER2_FREEMAP_LEVEL0_SIZE - 1)
410 * which is on a 1GB demark. This will eat a little more space but for
411 * now we retain compatibility and make FMZONEBASE every 1GB
414 #define H2FMBASE(key, radix) ((key) & ~(((hammer2_off_t)1 << (radix)) - 1))
417 * 16KB bitmap granularity (x2 bits per entry).
420 #define HAMMER2_FREEMAP_BLOCK_SIZE (1 << HAMMER2_FREEMAP_BLOCK_RADIX)
421 #define HAMMER2_FREEMAP_BLOCK_MASK (HAMMER2_FREEMAP_BLOCK_SIZE - 1)
433 #define HAMMER2_BMAP_ALLONES ((hammer2_bitmap_t)-1)
437 #define HAMMER2_BMAP_BLOCKS_PER_ELEMENT (1 << HAMMER2_BMAP_INDEX_RADIX)
441 #define HAMMER2_BMAP_INDEX_MASK (HAMMER2_BMAP_INDEX_SIZE - 1)
445 #define HAMMER2_BMAP_MASK (HAMMER2_BMAP_SIZE - 1)
475 #define HAMMER2_TID_MIN 1ULL
492 * minimum allocation chunk size is 1KB (a radix of 10), so HAMMER2 sets
493 * HAMMER2_RADIX_MIN to 10. The maximum radix is currently 16 (64KB), but
498 * not the '1 byte' it would otherwise calculate to.
500 #define HAMMER2_OFF_BAD ((hammer2_off_t)-1)
558 uint8_t reserved08[23]; /* 09-1F */
639 * ((key) + (1LL << keybits) - 1). HAMMER2 usually populates
728 * 10-16 are used (i.e. (1<<10) through (1<<16)).
754 #define HAMMER2_BREF_TYPE_INODE 1
777 #define HAMMER2_CHECK_DISABLED 1
800 #define HAMMER2_COMP_AUTOZERO 1
812 #define HAMMER2_METH_DEFAULT -1
821 * (1) When redundancy is desired a set may contain several duplicate
835 * Indirect blocks are typically 4KB (64 entres) or 64KB (1024 entries) and
847 #if (1 << HAMMER2_SET_RADIX) != HAMMER2_SET_COUNT
850 #if (1 << HAMMER2_PBUFRADIX) != HAMMER2_PBUFSIZE
853 #if (1 << HAMMER2_RADIX_MIN) != HAMMER2_ALLOC_MIN
861 * a LEVEL0 (4MB) block of storage. The storage is managed in 256 x 16KB
869 * linear - A BYTE linear allocation offset used for sub-16KB allocations
871 * if 16KB-aligned (i.e. force bitmap scan), otherwise may be
872 * used to sub-allocate within the 16KB block (which is already
875 * Sub-allocations need only be 1KB-aligned and do not have to be
876 * size-aligned, and 16KB or larger allocations do not update this
881 * desire to support sector sizes up to 16KB (so H2 only issues
882 * I/O's in multiples of 16KB anyway).
892 * bitmap - Two bits per 16KB allocation block arranged in arrays of
911 uint32_t avail; /* 1C */
912 uint32_t reserved20[8]; /* 20-3F 256 bits manages 128K/1KB/2-bits */
964 #define HAMMER2_INODE_VERSION_ONE 1
1074 #define HAMMER2_OBJTYPE_DIRECTORY 1
1085 #define HAMMER2_COPYID_LOCAL ((uint8_t)-1)
1138 #define HAMMER2_PFSSUBTYPE_SNAPSHOT 1 /* manual/managed snapshot */
1157 * Note that the minimum chunk size is 1KB so we could theoretically have
1291 * icrc_sects[6] - Sector 1 (512 bytes) of volume header, which is
1301 * sector #1 - 512 bytes
1354 * The whole volume block (64KB) has an iCRC covering all but the last 4 bytes,
1371 #define HAMMER2_VOL_VERSION_MIN 1
1372 #define HAMMER2_VOL_VERSION_DEFAULT 1