]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - db/dir2.h
xfs_repair: invalidate dirty dir buffers when we zap a directory
[thirdparty/xfsprogs-dev.git] / db / dir2.h
CommitLineData
2bd0ea18 1/*
da23017d
NS
2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
dfc130f3 4 *
da23017d
NS
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
2bd0ea18 7 * published by the Free Software Foundation.
dfc130f3 8 *
da23017d
NS
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
dfc130f3 13 *
da23017d
NS
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2bd0ea18
NS
17 */
18
a364668b
DC
19/*
20 * common types across directory formats
21 */
2bd0ea18
NS
22extern const field_t dir2_block_tail_flds[];
23extern const field_t dir2_data_free_flds[];
2bd0ea18 24extern const field_t dir2_data_union_flds[];
a364668b 25extern const field_t dir2_leaf_tail_flds[];
2bd0ea18 26extern const field_t dir2_leaf_entry_flds[];
a364668b
DC
27
28extern const field_t da_node_entry_flds[];
29
30/*
31 * dirv2 specific types
32 */
33extern const field_t dir2_flds[];
34extern const field_t dir2_hfld[];
35extern const field_t dir2_data_hdr_flds[];
36extern const field_t dir2_free_hdr_flds[];
2bd0ea18 37extern const field_t dir2_leaf_hdr_flds[];
2bd0ea18 38
9a048535 39extern const field_t da_blkinfo_flds[];
9a048535
DC
40extern const field_t da_node_hdr_flds[];
41
a364668b
DC
42/*
43 * dirv3 specific types
44 */
45extern const field_t dir3_flds[];
46extern const field_t dir3_hfld[];
47extern const field_t dir3_blkhdr_flds[];
48extern const field_t dir3_data_hdr_flds[];
49extern const field_t dir3_free_hdr_flds[];
50extern const field_t dir3_leaf_hdr_flds[];
3beed08e 51extern const field_t dir3_data_union_flds[];
a364668b
DC
52
53extern const field_t da3_blkinfo_flds[];
54extern const field_t da3_node_hdr_flds[];
55
d8bf9c63 56static inline uint8_t *xfs_dir2_sf_inumberp(xfs_dir2_sf_entry_t *sfep)
a2ceac1f 57{
d8bf9c63 58 return &(sfep)->name[(sfep)->namelen];
a2ceac1f
DC
59}
60
2bd0ea18
NS
61extern int dir2_data_union_size(void *obj, int startoff, int idx);
62extern int dir2_size(void *obj, int startoff, int idx);
89baf918 63extern void xfs_dir3_set_crc(struct xfs_buf *bp);
fc068a19
DC
64
65extern const struct xfs_buf_ops xfs_dir3_db_buf_ops;