aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/Kconfig10
-rw-r--r--fs/ocfs2/alloc.c5
-rw-r--r--fs/ocfs2/aops.c24
-rw-r--r--fs/ocfs2/journal.c14
-rw-r--r--fs/ocfs2/journal.h11
-rw-r--r--fs/ocfs2/ocfs2_jbd_compat.h82
6 files changed, 3 insertions, 143 deletions
diff --git a/fs/Kconfig b/fs/Kconfig
index e8a47f74a839..b93425ad15de 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -258,16 +258,6 @@ config OCFS2_DEBUG_FS
258 this option for debugging only as it is likely to decrease 258 this option for debugging only as it is likely to decrease
259 performance of the filesystem. 259 performance of the filesystem.
260 260
261config OCFS2_COMPAT_JBD
262 bool "Use JBD for compatibility"
263 depends on OCFS2_FS
264 default n
265 select JBD
266 help
267 The ocfs2 filesystem now uses JBD2 for its journalling. JBD2
268 is backwards compatible with JBD. It is safe to say N here.
269 However, if you really want to use the original JBD, say Y here.
270
271config OCFS2_FS_POSIX_ACL 261config OCFS2_FS_POSIX_ACL
272 bool "OCFS2 POSIX Access Control Lists" 262 bool "OCFS2 POSIX Access Control Lists"
273 depends on OCFS2_FS 263 depends on OCFS2_FS
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index e823a27ba340..69d67ab069bb 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -6638,11 +6638,6 @@ static void ocfs2_map_and_dirty_page(struct inode *inode, handle_t *handle,
6638 mlog_errno(ret); 6638 mlog_errno(ret);
6639 else if (ocfs2_should_order_data(inode)) { 6639 else if (ocfs2_should_order_data(inode)) {
6640 ret = ocfs2_jbd2_file_inode(handle, inode); 6640 ret = ocfs2_jbd2_file_inode(handle, inode);
6641#ifdef CONFIG_OCFS2_COMPAT_JBD
6642 ret = walk_page_buffers(handle, page_buffers(page),
6643 from, to, &partial,
6644 ocfs2_journal_dirty_data);
6645#endif
6646 if (ret < 0) 6641 if (ret < 0)
6647 mlog_errno(ret); 6642 mlog_errno(ret);
6648 } 6643 }
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index e219f8b546ac..6af79adb2eca 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -474,12 +474,6 @@ handle_t *ocfs2_start_walk_page_trans(struct inode *inode,
474 474
475 if (ocfs2_should_order_data(inode)) { 475 if (ocfs2_should_order_data(inode)) {
476 ret = ocfs2_jbd2_file_inode(handle, inode); 476 ret = ocfs2_jbd2_file_inode(handle, inode);
477#ifdef CONFIG_OCFS2_COMPAT_JBD
478 ret = walk_page_buffers(handle,
479 page_buffers(page),
480 from, to, NULL,
481 ocfs2_journal_dirty_data);
482#endif
483 if (ret < 0) 477 if (ret < 0)
484 mlog_errno(ret); 478 mlog_errno(ret);
485 } 479 }
@@ -1065,15 +1059,8 @@ static void ocfs2_write_failure(struct inode *inode,
1065 tmppage = wc->w_pages[i]; 1059 tmppage = wc->w_pages[i];
1066 1060
1067 if (page_has_buffers(tmppage)) { 1061 if (page_has_buffers(tmppage)) {
1068 if (ocfs2_should_order_data(inode)) { 1062 if (ocfs2_should_order_data(inode))
1069 ocfs2_jbd2_file_inode(wc->w_handle, inode); 1063 ocfs2_jbd2_file_inode(wc->w_handle, inode);
1070#ifdef CONFIG_OCFS2_COMPAT_JBD
1071 walk_page_buffers(wc->w_handle,
1072 page_buffers(tmppage),
1073 from, to, NULL,
1074 ocfs2_journal_dirty_data);
1075#endif
1076 }
1077 1064
1078 block_commit_write(tmppage, from, to); 1065 block_commit_write(tmppage, from, to);
1079 } 1066 }
@@ -1912,15 +1899,8 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
1912 } 1899 }
1913 1900
1914 if (page_has_buffers(tmppage)) { 1901 if (page_has_buffers(tmppage)) {
1915 if (ocfs2_should_order_data(inode)) { 1902 if (ocfs2_should_order_data(inode))
1916 ocfs2_jbd2_file_inode(wc->w_handle, inode); 1903 ocfs2_jbd2_file_inode(wc->w_handle, inode);
1917#ifdef CONFIG_OCFS2_COMPAT_JBD
1918 walk_page_buffers(wc->w_handle,
1919 page_buffers(tmppage),
1920 from, to, NULL,
1921 ocfs2_journal_dirty_data);
1922#endif
1923 }
1924 block_commit_write(tmppage, from, to); 1904 block_commit_write(tmppage, from, to);
1925 } 1905 }
1926 } 1906 }
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 9223bfcca3ba..12b62a3cbf69 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -434,20 +434,6 @@ int ocfs2_journal_dirty(handle_t *handle,
434 return status; 434 return status;
435} 435}
436 436
437#ifdef CONFIG_OCFS2_COMPAT_JBD
438int ocfs2_journal_dirty_data(handle_t *handle,
439 struct buffer_head *bh)
440{
441 int err = journal_dirty_data(handle, bh);
442 if (err)
443 mlog_errno(err);
444 /* TODO: When we can handle it, abort the handle and go RO on
445 * error here. */
446
447 return err;
448}
449#endif
450
451#define OCFS2_DEFAULT_COMMIT_INTERVAL (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE) 437#define OCFS2_DEFAULT_COMMIT_INTERVAL (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE)
452 438
453void ocfs2_set_journal_params(struct ocfs2_super *osb) 439void ocfs2_set_journal_params(struct ocfs2_super *osb)
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index d4d14e9a3cea..8203980fefed 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -27,12 +27,7 @@
27#define OCFS2_JOURNAL_H 27#define OCFS2_JOURNAL_H
28 28
29#include <linux/fs.h> 29#include <linux/fs.h>
30#ifndef CONFIG_OCFS2_COMPAT_JBD 30#include <linux/jbd2.h>
31# include <linux/jbd2.h>
32#else
33# include <linux/jbd.h>
34# include "ocfs2_jbd_compat.h"
35#endif
36 31
37enum ocfs2_journal_state { 32enum ocfs2_journal_state {
38 OCFS2_JOURNAL_FREE = 0, 33 OCFS2_JOURNAL_FREE = 0,
@@ -273,10 +268,6 @@ int ocfs2_journal_access(handle_t *handle,
273 */ 268 */
274int ocfs2_journal_dirty(handle_t *handle, 269int ocfs2_journal_dirty(handle_t *handle,
275 struct buffer_head *bh); 270 struct buffer_head *bh);
276#ifdef CONFIG_OCFS2_COMPAT_JBD
277int ocfs2_journal_dirty_data(handle_t *handle,
278 struct buffer_head *bh);
279#endif
280 271
281/* 272/*
282 * Credit Macros: 273 * Credit Macros:
diff --git a/fs/ocfs2/ocfs2_jbd_compat.h b/fs/ocfs2/ocfs2_jbd_compat.h
deleted file mode 100644
index b91c78f8f558..000000000000
--- a/fs/ocfs2/ocfs2_jbd_compat.h
+++ /dev/null
@@ -1,82 +0,0 @@
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
27struct 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
57static inline int jbd2_journal_file_inode(handle_t *handle,
58 struct jbd2_inode *inode)
59{
60 return 0;
61}
62
63static inline int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode,
64 loff_t new_size)
65{
66 return 0;
67}
68
69static inline void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode,
70 struct inode *inode)
71{
72 return;
73}
74
75static 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 */