1 /* btrfs.c - B-tree file system. */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
21 #define GRUB_BTRFS_H 1
25 GRUB_BTRFS_ITEM_TYPE_INODE_ITEM
= 0x01,
26 GRUB_BTRFS_ITEM_TYPE_INODE_REF
= 0x0c,
27 GRUB_BTRFS_ITEM_TYPE_DIR_ITEM
= 0x54,
28 GRUB_BTRFS_ITEM_TYPE_EXTENT_ITEM
= 0x6c,
29 GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM
= 0x84,
30 GRUB_BTRFS_ITEM_TYPE_ROOT_BACKREF
= 0x90,
31 GRUB_BTRFS_ITEM_TYPE_DEVICE
= 0xd8,
32 GRUB_BTRFS_ITEM_TYPE_CHUNK
= 0xe4
37 GRUB_BTRFS_ROOT_VOL_OBJECTID
= 5,
38 GRUB_BTRFS_TREE_ROOT_OBJECTID
= 0x100,
41 struct grub_btrfs_root_item
43 grub_uint8_t dummy
[0xb0];
50 grub_uint64_t object_id
;
56 struct grub_btrfs_root_backref
58 grub_uint64_t inode_id
;
64 struct grub_btrfs_inode_ref