xfs_dir2_trace.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of version 2 of the GNU General Public License as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it would be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. *
  12. * Further, this software is distributed without any warranty that it is
  13. * free of the rightful claim of any third person regarding infringement
  14. * or the like. Any license provided herein, whether implied or
  15. * otherwise, applies only to this software file. Patent licenses, if
  16. * any, provided herein do not apply to combinations of this program with
  17. * other software, or any other product whatsoever.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write the Free Software Foundation, Inc., 59
  21. * Temple Place - Suite 330, Boston MA 02111-1307, USA.
  22. *
  23. * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
  24. * Mountain View, CA 94043, or:
  25. *
  26. * http://www.sgi.com
  27. *
  28. * For further information regarding this notice, see:
  29. *
  30. * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  31. */
  32. #ifndef __XFS_DIR2_TRACE_H__
  33. #define __XFS_DIR2_TRACE_H__
  34. /*
  35. * Tracing for xfs v2 directories.
  36. */
  37. #if defined(XFS_DIR2_TRACE)
  38. struct ktrace;
  39. struct xfs_dabuf;
  40. struct xfs_da_args;
  41. #define XFS_DIR2_GTRACE_SIZE 4096 /* global buffer */
  42. #define XFS_DIR2_KTRACE_SIZE 32 /* per-inode buffer */
  43. extern struct ktrace *xfs_dir2_trace_buf;
  44. #define XFS_DIR2_KTRACE_ARGS 1 /* args only */
  45. #define XFS_DIR2_KTRACE_ARGS_B 2 /* args + buffer */
  46. #define XFS_DIR2_KTRACE_ARGS_BB 3 /* args + 2 buffers */
  47. #define XFS_DIR2_KTRACE_ARGS_DB 4 /* args, db, buffer */
  48. #define XFS_DIR2_KTRACE_ARGS_I 5 /* args, inum */
  49. #define XFS_DIR2_KTRACE_ARGS_S 6 /* args, int */
  50. #define XFS_DIR2_KTRACE_ARGS_SB 7 /* args, int, buffer */
  51. #define XFS_DIR2_KTRACE_ARGS_BIBII 8 /* args, buf/int/buf/int/int */
  52. void xfs_dir2_trace_args(char *where, struct xfs_da_args *args);
  53. void xfs_dir2_trace_args_b(char *where, struct xfs_da_args *args,
  54. struct xfs_dabuf *bp);
  55. void xfs_dir2_trace_args_bb(char *where, struct xfs_da_args *args,
  56. struct xfs_dabuf *lbp, struct xfs_dabuf *dbp);
  57. void xfs_dir2_trace_args_bibii(char *where, struct xfs_da_args *args,
  58. struct xfs_dabuf *bs, int ss,
  59. struct xfs_dabuf *bd, int sd, int c);
  60. void xfs_dir2_trace_args_db(char *where, struct xfs_da_args *args,
  61. xfs_dir2_db_t db, struct xfs_dabuf *bp);
  62. void xfs_dir2_trace_args_i(char *where, struct xfs_da_args *args, xfs_ino_t i);
  63. void xfs_dir2_trace_args_s(char *where, struct xfs_da_args *args, int s);
  64. void xfs_dir2_trace_args_sb(char *where, struct xfs_da_args *args, int s,
  65. struct xfs_dabuf *bp);
  66. #else /* XFS_DIR2_TRACE */
  67. #define xfs_dir2_trace_args(where, args)
  68. #define xfs_dir2_trace_args_b(where, args, bp)
  69. #define xfs_dir2_trace_args_bb(where, args, lbp, dbp)
  70. #define xfs_dir2_trace_args_bibii(where, args, bs, ss, bd, sd, c)
  71. #define xfs_dir2_trace_args_db(where, args, db, bp)
  72. #define xfs_dir2_trace_args_i(where, args, i)
  73. #define xfs_dir2_trace_args_s(where, args, s)
  74. #define xfs_dir2_trace_args_sb(where, args, s, bp)
  75. #endif /* XFS_DIR2_TRACE */
  76. #endif /* __XFS_DIR2_TRACE_H__ */