xfs_refcache.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2000-2003,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_REFCACHE_H__
  19. #define __XFS_REFCACHE_H__
  20. #ifdef HAVE_REFCACHE
  21. /*
  22. * Maximum size (in inodes) for the NFS reference cache
  23. */
  24. #define XFS_REFCACHE_SIZE_MAX 512
  25. struct xfs_inode;
  26. struct xfs_mount;
  27. extern void xfs_refcache_insert(struct xfs_inode *);
  28. extern void xfs_refcache_purge_ip(struct xfs_inode *);
  29. extern void xfs_refcache_purge_mp(struct xfs_mount *);
  30. extern void xfs_refcache_purge_some(struct xfs_mount *);
  31. extern void xfs_refcache_resize(int);
  32. extern void xfs_refcache_destroy(void);
  33. extern void xfs_refcache_iunlock(struct xfs_inode *, uint);
  34. #else
  35. #define xfs_refcache_insert(ip) do { } while (0)
  36. #define xfs_refcache_purge_ip(ip) do { } while (0)
  37. #define xfs_refcache_purge_mp(mp) do { } while (0)
  38. #define xfs_refcache_purge_some(mp) do { } while (0)
  39. #define xfs_refcache_resize(size) do { } while (0)
  40. #define xfs_refcache_destroy() do { } while (0)
  41. #define xfs_refcache_iunlock(ip, flags) xfs_iunlock(ip, flags)
  42. #endif
  43. #endif /* __XFS_REFCACHE_H__ */