xfs_dir2.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #ifndef __XFS_DIR2_H__
  19. #define __XFS_DIR2_H__
  20. struct xfs_bmap_free;
  21. struct xfs_da_args;
  22. struct xfs_inode;
  23. struct xfs_mount;
  24. struct xfs_trans;
  25. extern struct xfs_name xfs_name_dotdot;
  26. /*
  27. * Generic directory interface routines
  28. */
  29. extern void xfs_dir_startup(void);
  30. extern void xfs_dir_mount(struct xfs_mount *mp);
  31. extern int xfs_dir_isempty(struct xfs_inode *dp);
  32. extern int xfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp,
  33. struct xfs_inode *pdp);
  34. extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp,
  35. struct xfs_name *name, xfs_ino_t inum,
  36. xfs_fsblock_t *first,
  37. struct xfs_bmap_free *flist, xfs_extlen_t tot);
  38. extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp,
  39. struct xfs_name *name, xfs_ino_t *inum,
  40. struct xfs_name *ci_name);
  41. extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp,
  42. struct xfs_name *name, xfs_ino_t ino,
  43. xfs_fsblock_t *first,
  44. struct xfs_bmap_free *flist, xfs_extlen_t tot);
  45. extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp,
  46. struct xfs_name *name, xfs_ino_t inum,
  47. xfs_fsblock_t *first,
  48. struct xfs_bmap_free *flist, xfs_extlen_t tot);
  49. extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp,
  50. struct xfs_name *name, uint resblks);
  51. /*
  52. * Direct call from the bmap code, bypassing the generic directory layer.
  53. */
  54. extern int xfs_dir2_sf_to_block(struct xfs_da_args *args);
  55. #endif /* __XFS_DIR2_H__ */