aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/inode.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-09-03 23:03:41 -0400
committerMark Fasheh <mfasheh@suse.com>2008-10-13 20:02:43 -0400
commit2b4e30fbde425828b17f0e9c8f8e3fd3ecb2bc75 (patch)
tree5b340cde72e058b51642f0c7255818f62014bc91 /fs/ocfs2/inode.c
parent12462f1d9f0b96389497438dc2730c6f7410be82 (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/inode.c')
-rw-r--r--fs/ocfs2/inode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 4738dd25bb94..9d92c859ac94 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -534,6 +534,9 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
534 * data and fast symlinks. 534 * data and fast symlinks.
535 */ 535 */
536 if (fe->i_clusters) { 536 if (fe->i_clusters) {
537 if (ocfs2_should_order_data(inode))
538 ocfs2_begin_ordered_truncate(inode, 0);
539
537 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); 540 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
538 if (IS_ERR(handle)) { 541 if (IS_ERR(handle)) {
539 status = PTR_ERR(handle); 542 status = PTR_ERR(handle);
@@ -1100,6 +1103,8 @@ void ocfs2_clear_inode(struct inode *inode)
1100 oi->ip_last_trans = 0; 1103 oi->ip_last_trans = 0;
1101 oi->ip_dir_start_lookup = 0; 1104 oi->ip_dir_start_lookup = 0;
1102 oi->ip_blkno = 0ULL; 1105 oi->ip_blkno = 0ULL;
1106 jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal,
1107 &oi->ip_jinode);
1103 1108
1104bail: 1109bail:
1105 mlog_exit_void(); 1110 mlog_exit_void();