diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-09-03 23:03:41 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-10-13 20:02:43 -0400 |
commit | 2b4e30fbde425828b17f0e9c8f8e3fd3ecb2bc75 (patch) | |
tree | 5b340cde72e058b51642f0c7255818f62014bc91 /fs/ocfs2/super.c | |
parent | 12462f1d9f0b96389497438dc2730c6f7410be82 (diff) |
ocfs2: Switch over to JBD2.
ocfs2 wants JBD2 for many reasons, not the least of which is that JBD is
limiting our maximum filesystem size.
It's a pretty trivial change. Most functions are just renamed. The
only functional change is moving to Jan's inode-based ordered data mode.
It's better, too.
Because JBD2 reads and writes JBD journals, this is compatible with any
existing filesystem. It can even interact with JBD-based ocfs2 as long
as the journal is formated for JBD.
We provide a compatibility option so that paranoid people can still use
JBD for the time being. This will go away shortly.
[ Moved call of ocfs2_begin_ordered_truncate() from ocfs2_delete_inode() to
ocfs2_truncate_for_delete(). --Mark ]
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 1a51c8c53bef..8b4c5c67dcd4 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -212,10 +212,11 @@ static int ocfs2_sync_fs(struct super_block *sb, int wait) | |||
212 | ocfs2_schedule_truncate_log_flush(osb, 0); | 212 | ocfs2_schedule_truncate_log_flush(osb, 0); |
213 | } | 213 | } |
214 | 214 | ||
215 | if (journal_start_commit(OCFS2_SB(sb)->journal->j_journal, &target)) { | 215 | if (jbd2_journal_start_commit(OCFS2_SB(sb)->journal->j_journal, |
216 | &target)) { | ||
216 | if (wait) | 217 | if (wait) |
217 | log_wait_commit(OCFS2_SB(sb)->journal->j_journal, | 218 | jbd2_log_wait_commit(OCFS2_SB(sb)->journal->j_journal, |
218 | target); | 219 | target); |
219 | } | 220 | } |
220 | return 0; | 221 | return 0; |
221 | } | 222 | } |
@@ -332,6 +333,7 @@ static struct inode *ocfs2_alloc_inode(struct super_block *sb) | |||
332 | if (!oi) | 333 | if (!oi) |
333 | return NULL; | 334 | return NULL; |
334 | 335 | ||
336 | jbd2_journal_init_jbd_inode(&oi->ip_jinode, &oi->vfs_inode); | ||
335 | return &oi->vfs_inode; | 337 | return &oi->vfs_inode; |
336 | } | 338 | } |
337 | 339 | ||
@@ -896,7 +898,7 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
896 | if (option < 0) | 898 | if (option < 0) |
897 | return 0; | 899 | return 0; |
898 | if (option == 0) | 900 | if (option == 0) |
899 | option = JBD_DEFAULT_MAX_COMMIT_AGE; | 901 | option = JBD2_DEFAULT_MAX_COMMIT_AGE; |
900 | mopt->commit_interval = HZ * option; | 902 | mopt->commit_interval = HZ * option; |
901 | break; | 903 | break; |
902 | case Opt_localalloc: | 904 | case Opt_localalloc: |