xfs_trace.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (c) 2009, Christoph Hellwig
  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. #include "xfs.h"
  19. #include "xfs_fs.h"
  20. #include "xfs_types.h"
  21. #include "xfs_bit.h"
  22. #include "xfs_log.h"
  23. #include "xfs_inum.h"
  24. #include "xfs_trans.h"
  25. #include "xfs_sb.h"
  26. #include "xfs_ag.h"
  27. #include "xfs_dir2.h"
  28. #include "xfs_da_btree.h"
  29. #include "xfs_bmap_btree.h"
  30. #include "xfs_alloc_btree.h"
  31. #include "xfs_ialloc_btree.h"
  32. #include "xfs_dir2_sf.h"
  33. #include "xfs_attr_sf.h"
  34. #include "xfs_dinode.h"
  35. #include "xfs_inode.h"
  36. #include "xfs_btree.h"
  37. #include "xfs_dmapi.h"
  38. #include "xfs_mount.h"
  39. #include "xfs_ialloc.h"
  40. #include "xfs_itable.h"
  41. #include "xfs_alloc.h"
  42. #include "xfs_bmap.h"
  43. #include "xfs_attr.h"
  44. #include "xfs_attr_sf.h"
  45. #include "xfs_attr_leaf.h"
  46. #include "xfs_log_priv.h"
  47. #include "xfs_buf_item.h"
  48. #include "xfs_quota.h"
  49. #include "xfs_iomap.h"
  50. #include "xfs_aops.h"
  51. #include "quota/xfs_dquot_item.h"
  52. #include "quota/xfs_dquot.h"
  53. /*
  54. * Format fsblock number into a static buffer & return it.
  55. */
  56. STATIC char *xfs_fmtfsblock(xfs_fsblock_t bno)
  57. {
  58. static char rval[50];
  59. if (bno == NULLFSBLOCK)
  60. sprintf(rval, "NULLFSBLOCK");
  61. else if (isnullstartblock(bno))
  62. sprintf(rval, "NULLSTARTBLOCK(%lld)", startblockval(bno));
  63. else
  64. sprintf(rval, "%lld", (xfs_dfsbno_t)bno);
  65. return rval;
  66. }
  67. /*
  68. * We include this last to have the helpers above available for the trace
  69. * event implementations.
  70. */
  71. #define CREATE_TRACE_POINTS
  72. #include "xfs_trace.h"