1b1b8ab34Slling /*
2b1b8ab34Slling  *  GRUB  --  GRand Unified Bootloader
3b1b8ab34Slling  *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
4b1b8ab34Slling  *
5b1b8ab34Slling  *  This program is free software; you can redistribute it and/or modify
6b1b8ab34Slling  *  it under the terms of the GNU General Public License as published by
7b1b8ab34Slling  *  the Free Software Foundation; either version 2 of the License, or
8b1b8ab34Slling  *  (at your option) any later version.
9b1b8ab34Slling  *
10b1b8ab34Slling  *  This program is distributed in the hope that it will be useful,
11b1b8ab34Slling  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12b1b8ab34Slling  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13b1b8ab34Slling  *  GNU General Public License for more details.
14b1b8ab34Slling  *
15b1b8ab34Slling  *  You should have received a copy of the GNU General Public License
16b1b8ab34Slling  *  along with this program; if not, write to the Free Software
17b1b8ab34Slling  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18b1b8ab34Slling  */
19b1b8ab34Slling /*
20b1b8ab34Slling  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
21b1b8ab34Slling  * Use is subject to license terms.
22b1b8ab34Slling  */
23b1b8ab34Slling 
24b1b8ab34Slling #ifndef	_SYS_DSL_DATASET_H
25b1b8ab34Slling #define	_SYS_DSL_DATASET_H
26b1b8ab34Slling 
27b1b8ab34Slling typedef struct dsl_dataset_phys {
28b1b8ab34Slling 	uint64_t ds_dir_obj;
29b1b8ab34Slling 	uint64_t ds_prev_snap_obj;
30b1b8ab34Slling 	uint64_t ds_prev_snap_txg;
31b1b8ab34Slling 	uint64_t ds_next_snap_obj;
32b1b8ab34Slling 	uint64_t ds_snapnames_zapobj;	/* zap obj of snaps; ==0 for snaps */
33b1b8ab34Slling 	uint64_t ds_num_children;	/* clone/snap children; ==0 for head */
34b1b8ab34Slling 	uint64_t ds_creation_time;	/* seconds since 1970 */
35b1b8ab34Slling 	uint64_t ds_creation_txg;
36b1b8ab34Slling 	uint64_t ds_deadlist_obj;
37b1b8ab34Slling 	uint64_t ds_used_bytes;
38b1b8ab34Slling 	uint64_t ds_compressed_bytes;
39b1b8ab34Slling 	uint64_t ds_uncompressed_bytes;
40b1b8ab34Slling 	uint64_t ds_unique_bytes;	/* only relevant to snapshots */
41b1b8ab34Slling 	/*
42b1b8ab34Slling 	 * The ds_fsid_guid is a 56-bit ID that can change to avoid
43b1b8ab34Slling 	 * collisions.  The ds_guid is a 64-bit ID that will never
44b1b8ab34Slling 	 * change, so there is a small probability that it will collide.
45b1b8ab34Slling 	 */
46b1b8ab34Slling 	uint64_t ds_fsid_guid;
47b1b8ab34Slling 	uint64_t ds_guid;
48b1b8ab34Slling 	uint64_t ds_flags;
49b1b8ab34Slling 	blkptr_t ds_bp;
50b1b8ab34Slling 	uint64_t ds_pad[8]; /* pad out to 320 bytes for good measure */
51b1b8ab34Slling } dsl_dataset_phys_t;
52b1b8ab34Slling 
53b1b8ab34Slling #endif /* _SYS_DSL_DATASET_H */
54