1N/A/*
1N/A * GRUB -- GRand Unified Bootloader
1N/A * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
1N/A *
1N/A * This program is free software; you can redistribute it and/or modify
1N/A * it under the terms of the GNU General Public License as published by
1N/A * the Free Software Foundation; either version 2 of the License, or
1N/A * (at your option) any later version.
1N/A *
1N/A * This program is distributed in the hope that it will be useful,
1N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of
1N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A * GNU General Public License for more details.
1N/A *
1N/A * You should have received a copy of the GNU General Public License
1N/A * along with this program; if not, write to the Free Software
1N/A * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1N/A */
1N/A/*
1N/A * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
1N/A * Use is subject to license terms.
1N/A */
1N/A
1N/A#ifndef _SYS_UBERBLOCK_IMPL_H
1N/A#define _SYS_UBERBLOCK_IMPL_H
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A/*
1N/A * The uberblock version is incremented whenever an incompatible on-disk
1N/A * format change is made to the SPA, DMU, or ZAP.
1N/A *
1N/A * Note: the first two fields should never be moved. When a storage pool
1N/A * is opened, the uberblock must be read off the disk before the version
1N/A * can be checked. If the ub_version field is moved, we may not detect
1N/A * version mismatch. If the ub_magic field is moved, applications that
1N/A * expect the magic number in the first word won't work.
1N/A */
1N/A#define UBERBLOCK_MAGIC 0x00bab10c /* oo-ba-bloc! */
1N/A#define UBERBLOCK_SHIFT 10 /* up to 1K */
1N/A
1N/Astruct uberblock {
1N/A uint64_t ub_magic; /* UBERBLOCK_MAGIC */
1N/A uint64_t ub_version; /* ZFS_VERSION */
1N/A uint64_t ub_txg; /* txg of last sync */
1N/A uint64_t ub_guid_sum; /* sum of all vdev guids */
1N/A uint64_t ub_timestamp; /* UTC time of last sync */
1N/A blkptr_t ub_rootbp; /* MOS objset_phys_t */
1N/A};
1N/A
1N/A#endif /* _SYS_UBERBLOCK_IMPL_H */