2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
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.
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.
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
18 #ifndef __XFS_DIR2_H__
19 #define __XFS_DIR2_H__
27 extern struct xfs_name xfs_name_dotdot
;
30 * Generic directory interface routines
32 extern void xfs_dir_startup(void);
33 extern void xfs_dir_mount(struct xfs_mount
*mp
);
34 extern int xfs_dir_isempty(struct xfs_inode
*dp
);
35 extern int xfs_dir_init(struct xfs_trans
*tp
, struct xfs_inode
*dp
,
36 struct xfs_inode
*pdp
);
37 extern int xfs_dir_createname(struct xfs_trans
*tp
, struct xfs_inode
*dp
,
38 struct xfs_name
*name
, xfs_ino_t inum
,
40 struct xfs_bmap_free
*flist
, xfs_extlen_t tot
);
41 extern int xfs_dir_lookup(struct xfs_trans
*tp
, struct xfs_inode
*dp
,
42 struct xfs_name
*name
, xfs_ino_t
*inum
,
43 struct xfs_name
*ci_name
);
44 extern int xfs_dir_removename(struct xfs_trans
*tp
, struct xfs_inode
*dp
,
45 struct xfs_name
*name
, xfs_ino_t ino
,
47 struct xfs_bmap_free
*flist
, xfs_extlen_t tot
);
48 extern int xfs_dir_replace(struct xfs_trans
*tp
, struct xfs_inode
*dp
,
49 struct xfs_name
*name
, xfs_ino_t inum
,
51 struct xfs_bmap_free
*flist
, xfs_extlen_t tot
);
52 extern int xfs_dir_canenter(struct xfs_trans
*tp
, struct xfs_inode
*dp
,
53 struct xfs_name
*name
, uint resblks
);
56 * Direct call from the bmap code, bypassing the generic directory layer.
58 extern int xfs_dir2_sf_to_block(struct xfs_da_args
*args
);
60 #endif /* __XFS_DIR2_H__ */