ocfs2_jbd_compat.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* -*- mode: c; c-basic-offset: 8; -*-
  2. * vim: noexpandtab sw=8 ts=8 sts=0:
  3. *
  4. * ocfs2_jbd_compat.h
  5. *
  6. * Compatibility defines for JBD.
  7. *
  8. * Copyright (C) 2008 Oracle. All rights reserved.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public
  12. * License version 2 as published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. */
  19. #ifndef OCFS2_JBD_COMPAT_H
  20. #define OCFS2_JBD_COMPAT_H
  21. #ifndef CONFIG_OCFS2_COMPAT_JBD
  22. # error Should not have been included
  23. #endif
  24. struct jbd2_inode {
  25. unsigned int dummy;
  26. };
  27. #define JBD2_BARRIER JFS_BARRIER
  28. #define JBD2_DEFAULT_MAX_COMMIT_AGE JBD_DEFAULT_MAX_COMMIT_AGE
  29. #define jbd2_journal_ack_err journal_ack_err
  30. #define jbd2_journal_clear_err journal_clear_err
  31. #define jbd2_journal_destroy journal_destroy
  32. #define jbd2_journal_dirty_metadata journal_dirty_metadata
  33. #define jbd2_journal_errno journal_errno
  34. #define jbd2_journal_extend journal_extend
  35. #define jbd2_journal_flush journal_flush
  36. #define jbd2_journal_force_commit journal_force_commit
  37. #define jbd2_journal_get_write_access journal_get_write_access
  38. #define jbd2_journal_get_undo_access journal_get_undo_access
  39. #define jbd2_journal_init_inode journal_init_inode
  40. #define jbd2_journal_invalidatepage journal_invalidatepage
  41. #define jbd2_journal_load journal_load
  42. #define jbd2_journal_lock_updates journal_lock_updates
  43. #define jbd2_journal_restart journal_restart
  44. #define jbd2_journal_start journal_start
  45. #define jbd2_journal_start_commit journal_start_commit
  46. #define jbd2_journal_stop journal_stop
  47. #define jbd2_journal_try_to_free_buffers journal_try_to_free_buffers
  48. #define jbd2_journal_unlock_updates journal_unlock_updates
  49. #define jbd2_journal_wipe journal_wipe
  50. #define jbd2_log_wait_commit log_wait_commit
  51. static inline int jbd2_journal_file_inode(handle_t *handle,
  52. struct jbd2_inode *inode)
  53. {
  54. return 0;
  55. }
  56. static inline int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode,
  57. loff_t new_size)
  58. {
  59. return 0;
  60. }
  61. static inline void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode,
  62. struct inode *inode)
  63. {
  64. return;
  65. }
  66. static inline void jbd2_journal_release_jbd_inode(journal_t *journal,
  67. struct jbd2_inode *jinode)
  68. {
  69. return;
  70. }
  71. #endif /* OCFS2_JBD_COMPAT_H */