| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 2 |  * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. | 
 | 3 |  * All Rights Reserved. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 |  * | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 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 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 |  * published by the Free Software Foundation. | 
 | 8 |  * | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 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. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 |  * | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 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 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 |  */ | 
 | 18 | #ifndef __XFS_DIR2_H__ | 
| Christoph Hellwig | 5792664 | 2011-07-13 13:43:48 +0200 | [diff] [blame] | 19 | #define __XFS_DIR2_H__ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 |  | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 21 | struct xfs_bmap_free; | 
| Christoph Hellwig | 5792664 | 2011-07-13 13:43:48 +0200 | [diff] [blame] | 22 | struct xfs_da_args; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | struct xfs_inode; | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 24 | struct xfs_mount; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | struct xfs_trans; | 
 | 26 |  | 
| Barry Naujok | 556b8b1 | 2008-04-10 12:22:07 +1000 | [diff] [blame] | 27 | extern struct xfs_name	xfs_name_dotdot; | 
 | 28 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | /* | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 30 |  * Generic directory interface routines | 
 | 31 |  */ | 
 | 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, | 
| Barry Naujok | 556b8b1 | 2008-04-10 12:22:07 +1000 | [diff] [blame] | 38 | 				struct xfs_name *name, xfs_ino_t inum, | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 39 | 				xfs_fsblock_t *first, | 
 | 40 | 				struct xfs_bmap_free *flist, xfs_extlen_t tot); | 
 | 41 | extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp, | 
| Barry Naujok | 384f3ce | 2008-05-21 16:58:22 +1000 | [diff] [blame] | 42 | 				struct xfs_name *name, xfs_ino_t *inum, | 
 | 43 | 				struct xfs_name *ci_name); | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 44 | extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp, | 
| Barry Naujok | 556b8b1 | 2008-04-10 12:22:07 +1000 | [diff] [blame] | 45 | 				struct xfs_name *name, xfs_ino_t ino, | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 46 | 				xfs_fsblock_t *first, | 
 | 47 | 				struct xfs_bmap_free *flist, xfs_extlen_t tot); | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 48 | extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp, | 
| Barry Naujok | 556b8b1 | 2008-04-10 12:22:07 +1000 | [diff] [blame] | 49 | 				struct xfs_name *name, xfs_ino_t inum, | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 50 | 				xfs_fsblock_t *first, | 
 | 51 | 				struct xfs_bmap_free *flist, xfs_extlen_t tot); | 
 | 52 | extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp, | 
| Barry Naujok | 556b8b1 | 2008-04-10 12:22:07 +1000 | [diff] [blame] | 53 | 				struct xfs_name *name, uint resblks); | 
| Nathan Scott | f6c2d1f | 2006-06-20 13:04:51 +1000 | [diff] [blame] | 54 |  | 
 | 55 | /* | 
| Christoph Hellwig | 5792664 | 2011-07-13 13:43:48 +0200 | [diff] [blame] | 56 |  * Direct call from the bmap code, bypassing the generic directory layer. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 |  */ | 
| Christoph Hellwig | 5792664 | 2011-07-13 13:43:48 +0200 | [diff] [blame] | 58 | extern int xfs_dir2_sf_to_block(struct xfs_da_args *args); | 
| Barry Naujok | 384f3ce | 2008-05-21 16:58:22 +1000 | [diff] [blame] | 59 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | #endif	/* __XFS_DIR2_H__ */ |