]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - db/dir2.h
xfsprogs: call libxfs_destroy from other utilities
[thirdparty/xfsprogs-dev.git] / db / dir2.h
1 /*
2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
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
7 * published by the Free Software Foundation.
8 *
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.
13 *
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
17 */
18
19 /*
20 * common types across directory formats
21 */
22 extern const field_t dir2_block_tail_flds[];
23 extern const field_t dir2_data_free_flds[];
24 extern const field_t dir2_data_union_flds[];
25 extern const field_t dir2_leaf_tail_flds[];
26 extern const field_t dir2_leaf_entry_flds[];
27
28 extern const field_t da_node_entry_flds[];
29
30 /*
31 * dirv2 specific types
32 */
33 extern const field_t dir2_flds[];
34 extern const field_t dir2_hfld[];
35 extern const field_t dir2_data_hdr_flds[];
36 extern const field_t dir2_free_hdr_flds[];
37 extern const field_t dir2_leaf_hdr_flds[];
38
39 extern const field_t da_blkinfo_flds[];
40 extern const field_t da_node_hdr_flds[];
41
42 /*
43 * dirv3 specific types
44 */
45 extern const field_t dir3_flds[];
46 extern const field_t dir3_hfld[];
47 extern const field_t dir3_blkhdr_flds[];
48 extern const field_t dir3_data_hdr_flds[];
49 extern const field_t dir3_free_hdr_flds[];
50 extern const field_t dir3_leaf_hdr_flds[];
51 extern const field_t dir3_data_union_flds[];
52
53 extern const field_t da3_blkinfo_flds[];
54 extern const field_t da3_node_hdr_flds[];
55
56 static inline uint8_t *xfs_dir2_sf_inumberp(xfs_dir2_sf_entry_t *sfep)
57 {
58 return &(sfep)->name[(sfep)->namelen];
59 }
60
61 extern int dir2_data_union_size(void *obj, int startoff, int idx);
62 extern int dir2_size(void *obj, int startoff, int idx);
63 extern void xfs_dir3_set_crc(struct xfs_buf *bp);
64
65 extern const struct xfs_buf_ops xfs_dir3_db_buf_ops;