Joel Becker | 2b4e30f | 2008-09-03 20:03:41 -0700 | [diff] [blame] | 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 | |
| 20 | #ifndef OCFS2_JBD_COMPAT_H |
| 21 | #define OCFS2_JBD_COMPAT_H |
| 22 | |
| 23 | #ifndef CONFIG_OCFS2_COMPAT_JBD |
| 24 | # error Should not have been included |
| 25 | #endif |
| 26 | |
| 27 | struct jbd2_inode { |
| 28 | unsigned int dummy; |
| 29 | }; |
| 30 | |
| 31 | #define JBD2_BARRIER JFS_BARRIER |
| 32 | #define JBD2_DEFAULT_MAX_COMMIT_AGE JBD_DEFAULT_MAX_COMMIT_AGE |
| 33 | |
| 34 | #define jbd2_journal_ack_err journal_ack_err |
| 35 | #define jbd2_journal_clear_err journal_clear_err |
| 36 | #define jbd2_journal_destroy journal_destroy |
| 37 | #define jbd2_journal_dirty_metadata journal_dirty_metadata |
| 38 | #define jbd2_journal_errno journal_errno |
| 39 | #define jbd2_journal_extend journal_extend |
| 40 | #define jbd2_journal_flush journal_flush |
| 41 | #define jbd2_journal_force_commit journal_force_commit |
| 42 | #define jbd2_journal_get_write_access journal_get_write_access |
| 43 | #define jbd2_journal_get_undo_access journal_get_undo_access |
| 44 | #define jbd2_journal_init_inode journal_init_inode |
| 45 | #define jbd2_journal_invalidatepage journal_invalidatepage |
| 46 | #define jbd2_journal_load journal_load |
| 47 | #define jbd2_journal_lock_updates journal_lock_updates |
| 48 | #define jbd2_journal_restart journal_restart |
| 49 | #define jbd2_journal_start journal_start |
| 50 | #define jbd2_journal_start_commit journal_start_commit |
| 51 | #define jbd2_journal_stop journal_stop |
| 52 | #define jbd2_journal_try_to_free_buffers journal_try_to_free_buffers |
| 53 | #define jbd2_journal_unlock_updates journal_unlock_updates |
| 54 | #define jbd2_journal_wipe journal_wipe |
| 55 | #define jbd2_log_wait_commit log_wait_commit |
| 56 | |
| 57 | static inline int jbd2_journal_file_inode(handle_t *handle, |
| 58 | struct jbd2_inode *inode) |
| 59 | { |
| 60 | return 0; |
| 61 | } |
| 62 | |
| 63 | static inline int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode, |
| 64 | loff_t new_size) |
| 65 | { |
| 66 | return 0; |
| 67 | } |
| 68 | |
| 69 | static inline void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, |
| 70 | struct inode *inode) |
| 71 | { |
| 72 | return; |
| 73 | } |
| 74 | |
| 75 | static inline void jbd2_journal_release_jbd_inode(journal_t *journal, |
| 76 | struct jbd2_inode *jinode) |
| 77 | { |
| 78 | return; |
| 79 | } |
| 80 | |
| 81 | |
| 82 | #endif /* OCFS2_JBD_COMPAT_H */ |