1
/* -*- mode: c; c-basic-offset: 8; -*-
2
* vim: noexpandtab sw=8 ts=8 sts=0:
4
6
* Function prototypes, macros, etc. for related 'C' files
6
* Copyright (C) 2004 Oracle. All rights reserved.
8
* Copyright (C) 2004,2009 Oracle. All rights reserved.
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.
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.
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.
23
* Authors: Sunil Mushran
23
enum dump_block_type {
26
DUMP_BLOCK_EXTENT_BLOCK,
27
DUMP_BLOCK_GROUP_DESCRIPTOR,
29
31
typedef struct _list_dir_opts {
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,
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,
59
80
#endif /* __DUMP_H__ */