summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-12-09 15:33:23 +0100
committerKay Sievers <kay.sievers@vrfy.org>2008-12-09 15:33:23 +0100
commitc9809be56844710fffcba8741f485e0911551f19 (patch)
treedc2f58c0c8f718dea2feab3d66577741d01b786f /extras
parent2fc635fb67dbd509f4ee532c8bf0d3885cc71989 (diff)
volume_id: btrfs - update format
Diffstat (limited to 'extras')
-rw-r--r--extras/volume_id/lib/btrfs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/extras/volume_id/lib/btrfs.c b/extras/volume_id/lib/btrfs.c
index 1df8db50f1..09b03a68dc 100644
--- a/extras/volume_id/lib/btrfs.c
+++ b/extras/volume_id/lib/btrfs.c
@@ -42,6 +42,7 @@ struct btrfs_super_block {
uint64_t root;
uint64_t chunk_root;
uint64_t log_root;
+ uint64_t log_root_transid;
uint64_t total_bytes;
uint64_t bytes_used;
uint64_t root_dir_objectid;
@@ -52,6 +53,10 @@ struct btrfs_super_block {
uint32_t stripesize;
uint32_t sys_chunk_array_size;
uint64_t chunk_root_generation;
+ uint64_t compat_flags;
+ uint64_t compat_ro_flags;
+ uint64_t incompat_flags;
+ uint16_t csum_type;
uint8_t root_level;
uint8_t chunk_root_level;
uint8_t log_root_level;
@@ -64,6 +69,7 @@ struct btrfs_super_block {
uint32_t sector_size;
uint64_t type;
uint64_t generation;
+ uint64_t start_offset;
uint32_t dev_group;
uint8_t seek_speed;
uint8_t bandwidth;
@@ -80,11 +86,11 @@ int volume_id_probe_btrfs(struct volume_id *id, uint64_t off, uint64_t size)
info("probing at offset 0x%" PRIx64 ", size 0x%" PRIx64 "\n", off, size);
- buf = volume_id_get_buffer(id, off + 0x4000, 0x200);
+ buf = volume_id_get_buffer(id, off + 0x10000, 0x200);
if (buf == NULL)
return -1;
bfs = (struct btrfs_super_block *)buf;
- if (memcmp(bfs->magic, "_BFRfS_M", 8) != 0)
+ if (memcmp(bfs->magic, "_BHRfS_M", 8) != 0)
return -1;
volume_id_set_uuid(id, bfs->fsid, 0, UUID_DCE);
volume_id_set_label_raw(id, bfs->label, 256);