xfs_dir2_trace.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (c) 2000,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_TRACE_H__
  19. #define __XFS_DIR2_TRACE_H__
  20. /*
  21. * Tracing for xfs v2 directories.
  22. */
  23. #if defined(XFS_DIR2_TRACE)
  24. struct ktrace;
  25. struct xfs_dabuf;
  26. struct xfs_da_args;
  27. #define XFS_DIR2_GTRACE_SIZE 4096 /* global buffer */
  28. #define XFS_DIR2_KTRACE_SIZE 32 /* per-inode buffer */
  29. extern struct ktrace *xfs_dir2_trace_buf;
  30. #define XFS_DIR2_KTRACE_ARGS 1 /* args only */
  31. #define XFS_DIR2_KTRACE_ARGS_B 2 /* args + buffer */
  32. #define XFS_DIR2_KTRACE_ARGS_BB 3 /* args + 2 buffers */
  33. #define XFS_DIR2_KTRACE_ARGS_DB 4 /* args, db, buffer */
  34. #define XFS_DIR2_KTRACE_ARGS_I 5 /* args, inum */
  35. #define XFS_DIR2_KTRACE_ARGS_S 6 /* args, int */
  36. #define XFS_DIR2_KTRACE_ARGS_SB 7 /* args, int, buffer */
  37. #define XFS_DIR2_KTRACE_ARGS_BIBII 8 /* args, buf/int/buf/int/int */
  38. void xfs_dir2_trace_args(char *where, struct xfs_da_args *args);
  39. void xfs_dir2_trace_args_b(char *where, struct xfs_da_args *args,
  40. struct xfs_dabuf *bp);
  41. void xfs_dir2_trace_args_bb(char *where, struct xfs_da_args *args,
  42. struct xfs_dabuf *lbp, struct xfs_dabuf *dbp);
  43. void xfs_dir2_trace_args_bibii(char *where, struct xfs_da_args *args,
  44. struct xfs_dabuf *bs, int ss,
  45. struct xfs_dabuf *bd, int sd, int c);
  46. void xfs_dir2_trace_args_db(char *where, struct xfs_da_args *args,
  47. xfs_dir2_db_t db, struct xfs_dabuf *bp);
  48. void xfs_dir2_trace_args_i(char *where, struct xfs_da_args *args, xfs_ino_t i);
  49. void xfs_dir2_trace_args_s(char *where, struct xfs_da_args *args, int s);
  50. void xfs_dir2_trace_args_sb(char *where, struct xfs_da_args *args, int s,
  51. struct xfs_dabuf *bp);
  52. #else /* XFS_DIR2_TRACE */
  53. #define xfs_dir2_trace_args(where, args)
  54. #define xfs_dir2_trace_args_b(where, args, bp)
  55. #define xfs_dir2_trace_args_bb(where, args, lbp, dbp)
  56. #define xfs_dir2_trace_args_bibii(where, args, bs, ss, bd, sd, c)
  57. #define xfs_dir2_trace_args_db(where, args, db, bp)
  58. #define xfs_dir2_trace_args_i(where, args, i)
  59. #define xfs_dir2_trace_args_s(where, args, s)
  60. #define xfs_dir2_trace_args_sb(where, args, s, bp)
  61. #endif /* XFS_DIR2_TRACE */
  62. #endif /* __XFS_DIR2_TRACE_H__ */