Skip to content

Commit

Permalink
ocfs2: Remove JBD compatibility layer
Browse files Browse the repository at this point in the history
JBD2 is fully backwards compatible with JBD and it's been tested enough with
Ocfs2 that we can clean this code up now.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
  • Loading branch information
Mark Fasheh committed Jan 5, 2009
1 parent 511308d commit 53ef99c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 143 deletions.
10 changes: 0 additions & 10 deletions fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,6 @@ config OCFS2_DEBUG_FS
this option for debugging only as it is likely to decrease
performance of the filesystem.

config OCFS2_COMPAT_JBD
bool "Use JBD for compatibility"
depends on OCFS2_FS
default n
select JBD
help
The ocfs2 filesystem now uses JBD2 for its journalling. JBD2
is backwards compatible with JBD. It is safe to say N here.
However, if you really want to use the original JBD, say Y here.

config OCFS2_FS_POSIX_ACL
bool "OCFS2 POSIX Access Control Lists"
depends on OCFS2_FS
Expand Down
5 changes: 0 additions & 5 deletions fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6638,11 +6638,6 @@ static void ocfs2_map_and_dirty_page(struct inode *inode, handle_t *handle,
mlog_errno(ret);
else if (ocfs2_should_order_data(inode)) {
ret = ocfs2_jbd2_file_inode(handle, inode);
#ifdef CONFIG_OCFS2_COMPAT_JBD
ret = walk_page_buffers(handle, page_buffers(page),
from, to, &partial,
ocfs2_journal_dirty_data);
#endif
if (ret < 0)
mlog_errno(ret);
}
Expand Down
24 changes: 2 additions & 22 deletions fs/ocfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,6 @@ handle_t *ocfs2_start_walk_page_trans(struct inode *inode,

if (ocfs2_should_order_data(inode)) {
ret = ocfs2_jbd2_file_inode(handle, inode);
#ifdef CONFIG_OCFS2_COMPAT_JBD
ret = walk_page_buffers(handle,
page_buffers(page),
from, to, NULL,
ocfs2_journal_dirty_data);
#endif
if (ret < 0)
mlog_errno(ret);
}
Expand Down Expand Up @@ -1065,15 +1059,8 @@ static void ocfs2_write_failure(struct inode *inode,
tmppage = wc->w_pages[i];

if (page_has_buffers(tmppage)) {
if (ocfs2_should_order_data(inode)) {
if (ocfs2_should_order_data(inode))
ocfs2_jbd2_file_inode(wc->w_handle, inode);
#ifdef CONFIG_OCFS2_COMPAT_JBD
walk_page_buffers(wc->w_handle,
page_buffers(tmppage),
from, to, NULL,
ocfs2_journal_dirty_data);
#endif
}

block_commit_write(tmppage, from, to);
}
Expand Down Expand Up @@ -1912,15 +1899,8 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
}

if (page_has_buffers(tmppage)) {
if (ocfs2_should_order_data(inode)) {
if (ocfs2_should_order_data(inode))
ocfs2_jbd2_file_inode(wc->w_handle, inode);
#ifdef CONFIG_OCFS2_COMPAT_JBD
walk_page_buffers(wc->w_handle,
page_buffers(tmppage),
from, to, NULL,
ocfs2_journal_dirty_data);
#endif
}
block_commit_write(tmppage, from, to);
}
}
Expand Down
14 changes: 0 additions & 14 deletions fs/ocfs2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,20 +434,6 @@ int ocfs2_journal_dirty(handle_t *handle,
return status;
}

#ifdef CONFIG_OCFS2_COMPAT_JBD
int ocfs2_journal_dirty_data(handle_t *handle,
struct buffer_head *bh)
{
int err = journal_dirty_data(handle, bh);
if (err)
mlog_errno(err);
/* TODO: When we can handle it, abort the handle and go RO on
* error here. */

return err;
}
#endif

#define OCFS2_DEFAULT_COMMIT_INTERVAL (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE)

void ocfs2_set_journal_params(struct ocfs2_super *osb)
Expand Down
11 changes: 1 addition & 10 deletions fs/ocfs2/journal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@
#define OCFS2_JOURNAL_H

#include <linux/fs.h>
#ifndef CONFIG_OCFS2_COMPAT_JBD
# include <linux/jbd2.h>
#else
# include <linux/jbd.h>
# include "ocfs2_jbd_compat.h"
#endif
#include <linux/jbd2.h>

enum ocfs2_journal_state {
OCFS2_JOURNAL_FREE = 0,
Expand Down Expand Up @@ -273,10 +268,6 @@ int ocfs2_journal_access(handle_t *handle,
*/
int ocfs2_journal_dirty(handle_t *handle,
struct buffer_head *bh);
#ifdef CONFIG_OCFS2_COMPAT_JBD
int ocfs2_journal_dirty_data(handle_t *handle,
struct buffer_head *bh);
#endif

/*
* Credit Macros:
Expand Down
82 changes: 0 additions & 82 deletions fs/ocfs2/ocfs2_jbd_compat.h

This file was deleted.

0 comments on commit 53ef99c

Please sign in to comment.