2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (C) 1999,2000,2001,2002,2003,2004,2009 Free Software Foundation, Inc. 2N/A * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * GRUB is free software; you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License as published by 2N/A * the Free Software Foundation; either version 3 of the License, or 2N/A * (at your option) any later version. 2N/A * GRUB is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A * General-purpose 32-bit and 64-bit bitfield encodings. 2N/A * Size of block to hold the configuration data (a packed nvlist) 2N/A * The DVA size encodings for LSIZE and PSIZE support blocks up to 32MB. 2N/A * The ASIZE encoding should be at least 64 times larger (6 more bits) 2N/A * to support up to 4-way RAID-Z mirror mode with worst-case gang block 2N/A * overhead, three DVAs per bp, plus one more bit in case we do anything 2N/A * else that expands the ASIZE. 2N/A * All SPA data is represented by 128-bit data virtual addresses (DVAs). 2N/A * The members of the dva_t should be considered opaque outside the SPA. 2N/A * Each block has a 256-bit checksum -- strong enough for cryptographic hashes. 2N/A * Each block is described by its DVAs, time of birth, checksum, etc. 2N/A * The word-by-word, bit-by-bit layout of the blkptr is as follows: 2N/A * 64 56 48 40 32 24 16 8 0 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * 0 | vdev1 | GRID | ASIZE | 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * 2 | vdev2 | GRID | ASIZE | 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * 4 | vdev3 | GRID | ASIZE | 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * 6 |BDX|lvl| type | cksum | comp | PSIZE | LSIZE | 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * 9 | physical birth txg | 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * a | logical birth txg | 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * +-------+-------+-------+-------+-------+-------+-------+-------+ 2N/A * vdev virtual device ID 2N/A * offset offset into virtual device 2N/A * LSIZE logical size 2N/A * PSIZE physical size (after compression) 2N/A * ASIZE allocated size (including RAID-Z parity and gang block headers) 2N/A * GRID RAID-Z layout information (reserved for future use) 2N/A * cksum checksum function 2N/A * comp compression function 2N/A * G gang block indicator 2N/A * B byteorder (endianness) 2N/A * lvl level of indirection 2N/A * type DMU object type 2N/A * phys birth txg of block allocation; zero if same as logical birth txg 2N/A * log. birth transaction group in which the block was logically born 2N/A * fill count number of non-zero blocks under this bp 2N/A * checksum[4] 256-bit checksum of the data this bp describes 2N/A * Macros to get and set fields in a bp or DVA. 2N/A/* BP_IS_RAIDZ(bp) assumes no block compression */ 2N/A#
endif /* ! GRUB_ZFS_SPA_HEADER */