xfs_lrw.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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_LRW_H__
  19. #define __XFS_LRW_H__
  20. struct xfs_mount;
  21. struct xfs_inode;
  22. struct xfs_bmbt_irec;
  23. struct xfs_buf;
  24. struct xfs_iomap;
  25. #if defined(XFS_RW_TRACE)
  26. /*
  27. * Defines for the trace mechanisms in xfs_lrw.c.
  28. */
  29. #define XFS_RW_KTRACE_SIZE 128
  30. #define XFS_READ_ENTER 1
  31. #define XFS_WRITE_ENTER 2
  32. #define XFS_IOMAP_READ_ENTER 3
  33. #define XFS_IOMAP_WRITE_ENTER 4
  34. #define XFS_IOMAP_READ_MAP 5
  35. #define XFS_IOMAP_WRITE_MAP 6
  36. #define XFS_IOMAP_WRITE_NOSPACE 7
  37. #define XFS_ITRUNC_START 8
  38. #define XFS_ITRUNC_FINISH1 9
  39. #define XFS_ITRUNC_FINISH2 10
  40. #define XFS_CTRUNC1 11
  41. #define XFS_CTRUNC2 12
  42. #define XFS_CTRUNC3 13
  43. #define XFS_CTRUNC4 14
  44. #define XFS_CTRUNC5 15
  45. #define XFS_CTRUNC6 16
  46. #define XFS_BUNMAP 17
  47. #define XFS_INVAL_CACHED 18
  48. #define XFS_DIORD_ENTER 19
  49. #define XFS_DIOWR_ENTER 20
  50. #define XFS_WRITEPAGE_ENTER 22
  51. #define XFS_RELEASEPAGE_ENTER 23
  52. #define XFS_INVALIDPAGE_ENTER 24
  53. #define XFS_IOMAP_ALLOC_ENTER 25
  54. #define XFS_IOMAP_ALLOC_MAP 26
  55. #define XFS_IOMAP_UNWRITTEN 27
  56. #define XFS_SPLICE_READ_ENTER 28
  57. #define XFS_SPLICE_WRITE_ENTER 29
  58. extern void xfs_rw_enter_trace(int, struct xfs_inode *,
  59. void *, size_t, loff_t, int);
  60. extern void xfs_inval_cached_trace(struct xfs_inode *,
  61. xfs_off_t, xfs_off_t, xfs_off_t, xfs_off_t);
  62. #else
  63. #define xfs_rw_enter_trace(tag, ip, data, size, offset, ioflags)
  64. #define xfs_inval_cached_trace(ip, offset, len, first, last)
  65. #endif
  66. /* errors from xfsbdstrat() must be extracted from the buffer */
  67. extern void xfsbdstrat(struct xfs_mount *, struct xfs_buf *);
  68. extern int xfs_bdstrat_cb(struct xfs_buf *);
  69. extern int xfs_dev_is_read_only(struct xfs_mount *, char *);
  70. extern int xfs_zero_eof(struct xfs_inode *, xfs_off_t, xfs_fsize_t);
  71. #endif /* __XFS_LRW_H__ */