1 #------------------------------------------------------------------------------
2 # zfs: file(1) magic for ZFS dumps
4 # From <rea-fbsd@codelabs.ru>
5 # ZFS dump header has the following structure (as per zfs_ioctl.h
6 # in FreeBSD with drr_type is set to DRR_BEGIN)
9 # DRR_BEGIN, DRR_OBJECT, DRR_FREEOBJECTS,
10 # DRR_WRITE, DRR_FREE, DRR_END,
14 # uint64_t drr_version;
15 # uint64_t drr_creation_time;
16 # dmu_objset_type_t drr_type;
18 # uint64_t drr_toguid;
19 # uint64_t drr_fromguid;
20 # char drr_toname[MAXNAMELEN];
22 # Backup magic is 0x00000002f5bacbac (quad word)
23 # The drr_type is defined as
24 # typedef enum dmu_objset_type {
29 # DMU_OST_OTHER, /* For testing only! */
30 # DMU_OST_ANY, /* Be careful! */
32 # } dmu_objset_type_t;
34 # Almost all uint64_t fields are printed as the 32-bit ones (with high
35 # 32 bits zeroed), because there is no simple way to print them as the
39 8 string \000\000\000\002\365\272\313\254 ZFS shapshot (big-endian machine),
40 >20 belong x version %u,
41 >32 belong 0 type: NONE,
42 >32 belong 1 type: META,
43 >32 belong 2 type: ZFS,
44 >32 belong 3 type: ZVOL,
45 >32 belong 4 type: OTHER,
46 >32 belong 5 type: ANY,
47 >32 belong >5 type: UNKNOWN (%u),
48 >40 byte x destination GUID: %02X
58 >>>48 byte x source GUID: %02X
66 >56 string >\0 name: '%s'
68 # Little-endian values
69 8 string \254\313\272\365\002\000\000\000 ZFS shapshot (little-endian machine),
70 >16 lelong x version %u,
71 >32 lelong 0 type: NONE,
72 >32 lelong 1 type: META,
73 >32 lelong 2 type: ZFS,
74 >32 lelong 3 type: ZVOL,
75 >32 lelong 4 type: OTHER,
76 >32 lelong 5 type: ANY,
77 >32 lelong >5 type: UNKNOWN (%u),
78 >47 byte x destination GUID: %02X
88 >>>55 byte x source GUID: %02X
96 >56 string >\0 name: '%s'