~davewalker/ubuntu/natty/ocfs2-tools/bug_363877

« back to all changes in this revision

Viewing changes to debugfs.ocfs2/include/dump.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2009-07-06 07:26:30 UTC
  • mfrom: (1.1.7 upstream) (0.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090706072630-59335sl51k3rvu74
Tags: 1.4.2-1
* New upstream release (Closes: #535471).
* Drop patch for limits.h, included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
 
1
/* -*- mode: c; c-basic-offset: 8; -*-
 
2
 * vim: noexpandtab sw=8 ts=8 sts=0:
 
3
 *
2
4
 * dump.h
3
5
 *
4
6
 * Function prototypes, macros, etc. for related 'C' files
5
7
 *
6
 
 * Copyright (C) 2004 Oracle.  All rights reserved.
 
8
 * Copyright (C) 2004,2009 Oracle.  All rights reserved.
7
9
 *
8
10
 * This program is free software; you can redistribute it and/or
9
11
 * modify it under the terms of the GNU General Public
10
 
 * License as published by the Free Software Foundation; either
11
 
 * version 2 of the License, or (at your option) any later version.
 
12
 * License version 2 as published by the Free Software Foundation.
12
13
 * 
13
14
 * This program is distributed in the hope that it will be useful,
14
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
17
 * General Public License for more details.
17
 
 * 
18
 
 * You should have received a copy of the GNU General Public
19
 
 * License along with this program; if not, write to the
20
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
 
 * Boston, MA 021110-1307, USA.
22
 
 *
23
 
 * Authors: Sunil Mushran
24
18
 */
25
19
 
26
20
#ifndef __DUMP_H__
27
21
#define __DUMP_H__
28
22
 
 
23
enum dump_block_type {
 
24
        DUMP_BLOCK_UNKNOWN,
 
25
        DUMP_BLOCK_INODE,
 
26
        DUMP_BLOCK_EXTENT_BLOCK,
 
27
        DUMP_BLOCK_GROUP_DESCRIPTOR,
 
28
        DUMP_BLOCK_DIR_BLOCK,
 
29
};
 
30
 
29
31
typedef struct _list_dir_opts {
30
32
        ocfs2_filesys *fs;
31
33
        FILE *out;
33
35
        char *buf;
34
36
} list_dir_opts;
35
37
 
 
38
struct dirblocks_walk {
 
39
        ocfs2_filesys *fs;
 
40
        FILE *out;
 
41
        struct ocfs2_dinode *di;
 
42
        char *buf;
 
43
};
 
44
 
36
45
void dump_super_block (FILE *out, struct ocfs2_super_block *sb);
37
46
void dump_local_alloc (FILE *out, struct ocfs2_local_alloc *loc);
38
47
void dump_truncate_log (FILE *out, struct ocfs2_truncate_log *tl);
43
52
void dump_group_descriptor (FILE *out, struct ocfs2_group_desc *grp, int index);
44
53
int  dump_dir_entry (struct ocfs2_dir_entry *rec, int offset, int blocksize,
45
54
                     char *buf, void *priv_data);
 
55
void dump_dir_block(FILE *out, char *buf);
46
56
void dump_jbd_header (FILE *out, journal_header_t *header);
47
57
void dump_jbd_superblock (FILE *out, journal_superblock_t *jsb);
48
 
void dump_jbd_block (FILE *out, journal_header_t *header, uint64_t blknum);
49
 
void dump_jbd_metadata (FILE *out, int type, char *buf, uint64_t blknum);
 
58
void dump_jbd_block (FILE *out, journal_superblock_t *jsb,
 
59
                     journal_header_t *header, uint64_t blknum);
 
60
void dump_jbd_metadata (FILE *out, enum dump_block_type type, char *buf,
 
61
                        uint64_t blknum);
50
62
void dump_jbd_unknown (FILE *out, uint64_t start, uint64_t end);
51
 
void dump_slots (FILE *out, char *buf, uint32_t len);
 
63
void dump_slots (FILE *out, struct ocfs2_slot_map_extended *se,
 
64
                 struct ocfs2_slot_map *sm, int num_slots);
52
65
void dump_fast_symlink (FILE *out, char *link);
53
66
void dump_hb (FILE *out, char *buf, uint32_t len);
54
67
void dump_inode_path (FILE *out, uint64_t blkno, char *path);
55
68
void dump_logical_blkno(FILE *out, uint64_t blkno);
56
69
void dump_icheck(FILE *out, int hdr, uint64_t blkno, uint64_t inode,
57
70
                 int validoffset, uint64_t offset, int status);
 
71
void dump_block_check(FILE *out, struct ocfs2_block_check *bc);
 
72
uint32_t dump_xattr_ibody(FILE *out, ocfs2_filesys *fs,
 
73
                          struct ocfs2_dinode *in, int verbose);
 
74
errcode_t dump_xattr_block(FILE *out, ocfs2_filesys *fs,
 
75
                           struct ocfs2_dinode *in,
 
76
                           uint32_t *xattrs_block,
 
77
                           uint64_t *xattrs_bucket,
 
78
                           int verbose);
58
79
 
59
80
#endif          /* __DUMP_H__ */