/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
*/
#ifndef _FSYS_ZFS_H
#define _FSYS_ZFS_H
#ifdef FSYS_ZFS
#ifndef FSIMAGE
typedef unsigned long long uint64_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
typedef unsigned char uchar_t;
typedef unsigned long size_t;
#else
typedef unsigned int size_t;
#endif
#else
#include "fsi_zfs.h"
#endif /* !FSIMAGE */
#include <zfs-include/zfs.h>
#include <zfs-include/dmu.h>
#include <zfs-include/spa.h>
#include <zfs-include/zio.h>
#include <zfs-include/zio_checksum.h>
#include <zfs-include/vdev_impl.h>
#include <zfs-include/zap_impl.h>
#include <zfs-include/zap_leaf.h>
#include <zfs-include/uberblock_impl.h>
#include <zfs-include/dnode.h>
#include <zfs-include/dsl_dir.h>
#include <zfs-include/zfs_acl.h>
#include <zfs-include/zfs_znode.h>
#include <zfs-include/dsl_dataset.h>
#include <zfs-include/zil.h>
#include <zfs-include/dmu_objset.h>
#include <zfs-include/sa_impl.h>
/*
* Global Memory addresses to store MOS and DNODE data
*/
/*
* Verify dnode type.
* Can only be used in functions returning non-0 for failure.
*/
return (ERR_FSYS_CORRUPT); \
}
/*
* Verify object set type.
* Can only be used in functions returning 0 for failure.
*/
errnum = ERR_FSYS_CORRUPT; \
return (0); \
}
/* General macros */
/*
* Macros to get fields in a bp or DVA.
*/
/*
* return x rounded down to an align boundary
* eg, P2ALIGN(1200, 1024) == 1024 (1*align)
* eg, P2ALIGN(1024, 1024) == 1024 (1*align)
* eg, P2ALIGN(0x1234, 0x100) == 0x1200 (0x12*align)
* eg, P2ALIGN(0x5600, 0x100) == 0x5600 (0x56*align)
*/
/*
* For nvlist manipulation. (from nvpair.h)
*/
#define NV_ENCODE_NATIVE 0
typedef enum {
DATA_TYPE_UNKNOWN = 0,
} data_type_t;
/*
* Decompression Entry - lzjb
*/
#ifndef NBBY
#endif
typedef struct decomp_entry {
char *name;
/*
* FAT ZAP data structures
*/
/*
* The amount of space within the chunk available for the array is:
* chunk size - space for type (1) - space for next pointer (2)
*/
/*
* The amount of space available for chunks is:
* block size shift - hash entry size (2) * number of hash
* entries - header space (2*chunksize)
*/
ZAP_LEAF_CHUNKSIZE - 2)
/*
* The chunks start immediately after the hash table. The end of the
* hash table is at l_hash + HASH_NUMENTRIES, which we simply cast to a
* chunk_t.
*/
#endif /* FSYS_ZFS */
#endif /* !_FSYS_ZFS_H */