Skip to contentSkip to conversation

libgfs2: Add beginnings of a metadata description

Cluster-devel Steven Whitehouse 2 participants 2 messages Dec 20, 2011 – Dec 22, 2011

lore
Share & tools
lore
#0 lore raw

From f2d72f2786b1fc23188657e767ca754e94d2306c Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
Date: Tue, 20 Dec 2011 20:01:35 +0000
Subject: [PATCH] libgfs2: Add beginnings of a metadata description

The intent here is to start a framework which will describe the GFS/GFS2 metadata in enough detail to be used by the utilities. Initially there is little more than names, sizes and offsets of the various fields, but I hope to expand on this a bit in future.

The other thing that I've added, is a simple self-check function. Again, I hope that we can build on this base and expand the tests as time goes on.

Currently nothing uses this new infrastructure, but again, in time it should be possible to integrate it into the utilities. In the mean time I want to make sure it is as complete and correct as possible.

A side effect of this is that every bit of metadata has been assigned a unique id. That includes those items which do not have the gfs2_meta_header at the start of them, and so don't have a type or format number.

---
 gfs2/libgfs2/Makefile.am |    2 +-
 gfs2/libgfs2/libgfs2.h   |   50 ++++
 gfs2/libgfs2/meta.c      |  569 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 620 insertions(+), 1 deletions(-)
 create mode 100644 gfs2/libgfs2/meta.c
gfs2/libgfs2/Makefile.am +1 -1
index ab03348..4e60b0a 100644
@@ -7,7 +7,7 @@ noinst_LTLIBRARIES	= libgfs2.la
 libgfs2_la_SOURCES	= block_list.c fs_bits.c gfs1.c misc.c rgrp.c super.c \
 			  buf.c fs_geometry.c gfs2_disk_hash.c ondisk.c \
 			  device_geometry.c fs_ops.c gfs2_log.c recovery.c \
-			  structures.c
+			  structures.c meta.c
 
 libgfs2_la_CPPFLAGS	= -D_FILE_OFFSET_BITS=64 \
 			  -D_LARGEFILE64_SOURCE \
gfs2/libgfs2/libgfs2.h +50 -0

62 lines not on this page · raw message

gfs2/libgfs2/meta.c new file +569 -0

569 lines not on this page · raw message

Signature · 1 line
1.7.4.4
#1 lore raw

----- Original Message -----

| >From f2d72f2786b1fc23188657e767ca754e94d2306c Mon Sep 17 00:00:00
| >2001
| From: Steven Whitehouse <[email protected]>
| Date: Tue, 20 Dec 2011 20:01:35 +0000
| Subject: [PATCH] libgfs2: Add beginnings of a metadata description
| 
| The intent here is to start a framework which will describe the
| GFS/GFS2 metadata in enough detail to be used by the utilities.
| Initially there is little more than names, sizes and offsets of
| the various fields, but I hope to expand on this a bit in future.
| 
| The other thing that I've added, is a simple self-check function.
| Again, I hope that we can build on this base and expand the tests
| as time goes on.
| 
| Currently nothing uses this new infrastructure, but again, in time
| it should be possible to integrate it into the utilities. In the
| mean time I want to make sure it is as complete and correct as
| possible.
| 
| A side effect of this is that every bit of metadata has been
| assigned a unique id. That includes those items which do not
| have the gfs2_meta_header at the start of them, and so don't
| have a type or format number.
| 
| Signed-off-by: Steven Whitehouse <[email protected]>
| ---

Hi,

ACKed by Bob Peterson <[email protected]>

Regards,

Bob Peterson
Red Hat File Systems