patch-2.4.20 linux-2.4.20/fs/intermezzo/journal_reiserfs.c
Next file: linux-2.4.20/fs/intermezzo/journal_tmpfs.c
Previous file: linux-2.4.20/fs/intermezzo/journal_obdfs.c
Back to the patch index
Back to the overall index
- Lines: 109
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/fs/intermezzo/journal_reiserfs.c
- Orig date:
Sun Nov 11 10:20:21 2001
diff -urN linux-2.4.19/fs/intermezzo/journal_reiserfs.c linux-2.4.20/fs/intermezzo/journal_reiserfs.c
@@ -1,10 +1,26 @@
-
-/*
- * Intermezzo. (C) 1998 Peter J. Braam
- * Intermezzo. (C) 2000 Red Hat, Inc.
- * Intermezzo. (C) 2000 Los Alamos National Laboratory
- * Intermezzo. (C) 2000 TurboLinux, Inc.
- * Intermezzo. (C) 2001 Mountain View Data, Inc.
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ * Copyright (C) 1998 Peter J. Braam <braam@clusterfs.com>
+ * Copyright (C) 2000 Red Hat, Inc.
+ * Copyright (C) 2000 Los Alamos National Laboratory
+ * Copyright (C) 2000 TurboLinux, Inc.
+ * Copyright (C) 2001 Mountain View Data, Inc.
+ *
+ * This file is part of InterMezzo, http://www.inter-mezzo.org.
+ *
+ * InterMezzo is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * InterMezzo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with InterMezzo; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/types.h>
@@ -28,9 +44,8 @@
#endif
#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_upcall.h>
#include <linux/intermezzo_psdev.h>
-#include <linux/intermezzo_kml.h>
+
#if defined(CONFIG_REISERFS_FS) || defined(CONFIG_REISERFS_FS_MODULE)
@@ -54,9 +69,9 @@
__u32 avail_kmlblocks;
struct reiserfs_transaction_handle *th ;
- PRESTO_ALLOC(th, struct reiserfs_transaction_handle *, sizeof(*th));
+ PRESTO_ALLOC(th, sizeof(*th));
if (!th) {
- printk("presto: No memory for trans handle\n");
+ CERROR("presto: No memory for trans handle\n");
return NULL;
}
@@ -83,23 +98,24 @@
CDEBUG(D_JOURNAL, "creating journal handle (%d blocks)\n", jblocks);
lock_kernel();
- //journal_begin(th, inode->i_sb, jblocks);
+ journal_begin(th, inode->i_sb, jblocks);
unlock_kernel();
return th;
}
-void presto_reiserfs_trans_commit(struct presto_file_set *fset, void *handle)
+static void presto_reiserfs_trans_commit(struct presto_file_set *fset,
+ void *handle)
{
int jblocks;
jblocks = 3 + JOURNAL_PER_BALANCE_CNT * 4;
lock_kernel();
- //journal_end(handle, fset->fset_cache->cache_sb, jblocks);
+ journal_end(handle, fset->fset_cache->cache_sb, jblocks);
unlock_kernel();
PRESTO_FREE(handle, sizeof(struct reiserfs_transaction_handle));
}
-void presto_reiserfs_journal_file_data(struct inode *inode)
+static void presto_reiserfs_journal_file_data(struct inode *inode)
{
#ifdef EXT3_JOURNAL_DATA_FL
inode->u.ext3_i.i_flags |= EXT3_JOURNAL_DATA_FL;
@@ -108,11 +124,18 @@
#endif
}
+static int presto_reiserfs_has_all_data(struct inode *inode)
+{
+ BUG();
+ return 0;
+}
+
struct journal_ops presto_reiserfs_journal_ops = {
- tr_avail: presto_reiserfs_freespace,
- tr_start: presto_reiserfs_trans_start,
- tr_commit: presto_reiserfs_trans_commit,
- tr_journal_data: presto_reiserfs_journal_file_data
+ .tr_all_data = presto_reiserfs_has_all_data,
+ .tr_avail = presto_reiserfs_freespace,
+ .tr_start = presto_reiserfs_trans_start,
+ .tr_commit = presto_reiserfs_trans_commit,
+ .tr_journal_data = presto_reiserfs_journal_file_data
};
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)