]>
git.ipfire.org Git - people/ms/u-boot.git/blob - include/zfs/zio.h
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
5 * SPDX-License-Identifier: GPL-2.0+
8 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
16 #define ZEC_MAGIC 0x210da7ab10c7a11ULL /* zio data bloc tail */
18 typedef struct zio_eck
{
19 uint64_t zec_magic
; /* for validation, endianness */
20 zio_cksum_t zec_cksum
; /* 256-bit checksum */
24 * Gang block headers are self-checksumming and contain an array
27 #define SPA_GANGBLOCKSIZE SPA_MINBLOCKSIZE
28 #define SPA_GBH_NBLKPTRS ((SPA_GANGBLOCKSIZE - \
29 sizeof(zio_eck_t)) / sizeof(blkptr_t))
30 #define SPA_GBH_FILLER ((SPA_GANGBLOCKSIZE - \
32 (SPA_GBH_NBLKPTRS * sizeof(blkptr_t))) /\
35 #define ZIO_GET_IOSIZE(zio) \
36 (BP_IS_GANG((zio)->io_bp) ? \
37 SPA_GANGBLOCKSIZE : BP_GET_PSIZE((zio)->io_bp))
39 typedef struct zio_gbh
{
40 blkptr_t zg_blkptr
[SPA_GBH_NBLKPTRS
];
41 uint64_t zg_filler
[SPA_GBH_FILLER
];
46 ZIO_CHECKSUM_INHERIT
= 0,
50 ZIO_CHECKSUM_GANG_HEADER
,
52 ZIO_CHECKSUM_FLETCHER_2
,
53 ZIO_CHECKSUM_FLETCHER_4
,
56 ZIO_CHECKSUM_FUNCTIONS
59 #define ZIO_CHECKSUM_ON_VALUE ZIO_CHECKSUM_FLETCHER_2
60 #define ZIO_CHECKSUM_DEFAULT ZIO_CHECKSUM_ON
63 ZIO_COMPRESS_INHERIT
= 0,
77 ZIO_COMPRESS_FUNCTIONS