-Index: linux-2.6.18-128.1.14/fs/jbd/commit.c
+Index: linux-2.6.18-164.6.1/fs/jbd/commit.c
===================================================================
---- linux-2.6.18-128.1.14.orig/fs/jbd/commit.c 2009-06-19 12:34:22.000000000 -0600
-+++ linux-2.6.18-128.1.14/fs/jbd/commit.c 2009-06-19 12:35:11.000000000 -0600
+--- linux-2.6.18-164.6.1.orig/fs/jbd/commit.c
++++ linux-2.6.18-164.6.1/fs/jbd/commit.c
@@ -22,6 +22,7 @@
#include <linux/mm.h>
#include <linux/pagemap.h>
/*
-@@ -95,19 +96,23 @@
+@@ -108,19 +109,23 @@ static int inverted_lock(journal_t *jour
return 1;
}
int barrier_done = 0;
if (is_journal_aborted(journal))
-@@ -119,21 +124,34 @@
+@@ -132,21 +137,34 @@ static int journal_write_commit_record(j
bh = jh2bh(descriptor);
/* is it possible for another commit to fail at roughly
* the same time as this one? If so, we don't want to
* trust the barrier flag in the super, but instead want
-@@ -154,12 +173,70 @@
+@@ -164,15 +182,74 @@ static int journal_write_commit_record(j
+ spin_unlock(&journal->j_state_lock);
+
+ /* And try again, without the barrier */
++ lock_buffer(bh);
clear_buffer_ordered(bh);
set_buffer_uptodate(bh);
set_buffer_dirty(bh);
+ *cbh = bh;
+ return ret;
+}
-+
+
+- return (ret == -EIO);
+/*
+ * This function along with journal_submit_commit_record
+ * allows to write the commit record asynchronously.
+{
+ int ret = 0;
+ struct journal_head *jh;
-
-- return (ret == -EIO);
++
+ while (commit_transaction->t_locked_list) {
+ struct buffer_head *bh;
+
}
void journal_do_submit_data(struct buffer_head **wbuf, int bufs)
-@@ -282,6 +359,20 @@
+@@ -295,6 +372,20 @@ write_out_data:
return err;
}
/*
* journal_commit_transaction
*
-@@ -305,6 +396,8 @@
+@@ -318,6 +409,8 @@ void journal_commit_transaction(journal_
int first_tag = 0;
int tag_flag;
int i;
/*
* First job: lock down the current transaction and wait for
-@@ -431,39 +524,14 @@
+@@ -444,39 +537,14 @@ void journal_commit_transaction(journal_
err = journal_submit_data_buffers(journal, commit_transaction);
/*
spin_unlock(&journal->j_list_lock);
if (err)
-@@ -642,6 +710,16 @@
+@@ -653,6 +721,16 @@ void journal_commit_transaction(journal_
start_journal_io:
for (i = 0; i < bufs; i++) {
struct buffer_head *bh = wbuf[i];
lock_buffer(bh);
clear_buffer_dirty(bh);
set_buffer_uptodate(bh);
-@@ -658,6 +736,23 @@
+@@ -669,6 +747,23 @@ start_journal_io:
}
}
/* Lo and behold: we have just managed to send a transaction to
the log. Before we can commit it, wait for the IO so far to
complete. Control buffers being written are on the
-@@ -759,9 +854,15 @@
+@@ -770,9 +865,15 @@ wait_for_iobuf:
journal_abort(journal, err);
jbd_debug(3, "JBD: commit phase 6\n");
if (err)
journal_abort(journal, err);
-Index: linux-2.6.18-128.1.14/include/linux/jbd.h
+Index: linux-2.6.18-164.6.1/include/linux/jbd.h
===================================================================
---- linux-2.6.18-128.1.14.orig/include/linux/jbd.h 2009-06-19 12:34:22.000000000 -0600
-+++ linux-2.6.18-128.1.14/include/linux/jbd.h 2009-06-19 12:35:11.000000000 -0600
-@@ -148,6 +148,29 @@
+--- linux-2.6.18-164.6.1.orig/include/linux/jbd.h
++++ linux-2.6.18-164.6.1/include/linux/jbd.h
+@@ -148,6 +148,29 @@ typedef struct journal_header_s
__be32 h_sequence;
} journal_header_t;
/*
* The block tag: used to describe a single buffer in the journal
-@@ -234,12 +257,16 @@
+@@ -234,12 +257,16 @@ typedef struct journal_superblock_s
((j)->j_format_version >= 2 && \
((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
#ifdef __KERNEL__
-@@ -1053,6 +1080,8 @@
+@@ -1053,6 +1080,8 @@ extern int journal_check_available_fe
(journal_t *, unsigned long, unsigned long, unsigned long);
extern int journal_set_features
(journal_t *, unsigned long, unsigned long, unsigned long);
extern int journal_create (journal_t *);
extern int journal_load (journal_t *journal);
#ifndef __GENKSYMS__
-Index: linux-2.6.18-128.1.14/fs/jbd/recovery.c
+Index: linux-2.6.18-164.6.1/fs/jbd/recovery.c
===================================================================
---- linux-2.6.18-128.1.14.orig/fs/jbd/recovery.c 2009-06-19 12:33:10.000000000 -0600
-+++ linux-2.6.18-128.1.14/fs/jbd/recovery.c 2009-06-19 12:35:11.000000000 -0600
+--- linux-2.6.18-164.6.1.orig/fs/jbd/recovery.c
++++ linux-2.6.18-164.6.1/fs/jbd/recovery.c
@@ -21,6 +21,7 @@
#include <linux/jbd.h>
#include <linux/errno.h>
#endif
/*
-@@ -310,6 +311,38 @@
+@@ -310,6 +311,38 @@ int journal_skip_recovery(journal_t *jou
return err;
}
static int do_one_pass(journal_t *journal,
struct recovery_info *info, enum passtype pass)
{
-@@ -321,6 +354,7 @@
+@@ -321,6 +354,7 @@ static int do_one_pass(journal_t *journa
struct buffer_head * bh;
unsigned int sequence;
int blocktype;
/* Precompute the maximum metadata descriptors in a descriptor block */
int MAX_BLOCKS_PER_DESC;
-@@ -412,9 +446,24 @@
+@@ -412,9 +446,24 @@ static int do_one_pass(journal_t *journa
switch(blocktype) {
case JFS_DESCRIPTOR_BLOCK:
/* If it is a valid descriptor block, replay it
next_log_block +=
count_tags(bh, journal->j_blocksize);
wrap(journal, next_log_block);
-@@ -509,9 +558,97 @@
+@@ -509,9 +558,97 @@ static int do_one_pass(journal_t *journa
continue;
case JFS_COMMIT_BLOCK:
brelse(bh);
next_commit_ID++;
continue;
-@@ -547,9 +684,10 @@
+@@ -547,9 +684,10 @@ static int do_one_pass(journal_t *journa
* transaction marks the end of the valid log.
*/
/* It's really bad news if different passes end up at
* different places (but possible due to IO errors). */
if (info->end_transaction != next_commit_ID) {
-Index: linux-2.6.18-128.1.14/fs/jbd/journal.c
+Index: linux-2.6.18-164.6.1/fs/jbd/journal.c
===================================================================
---- linux-2.6.18-128.1.14.orig/fs/jbd/journal.c 2009-06-19 12:34:22.000000000 -0600
-+++ linux-2.6.18-128.1.14/fs/jbd/journal.c 2009-06-19 12:35:11.000000000 -0600
-@@ -67,6 +67,7 @@
+--- linux-2.6.18-164.6.1.orig/fs/jbd/journal.c
++++ linux-2.6.18-164.6.1/fs/jbd/journal.c
+@@ -67,6 +67,7 @@ EXPORT_SYMBOL(journal_update_format);
EXPORT_SYMBOL(journal_check_used_features);
EXPORT_SYMBOL(journal_check_available_features);
EXPORT_SYMBOL(journal_set_features);
EXPORT_SYMBOL(journal_create);
EXPORT_SYMBOL(journal_load);
EXPORT_SYMBOL(journal_destroy);
-@@ -1583,6 +1584,33 @@
+@@ -1583,6 +1584,33 @@ int journal_set_features (journal_t *jou
return 1;
}
/**
* int journal_update_format () - Update on-disk journal structure.
-Index: linux-2.6.18-128.1.14/fs/Kconfig
+Index: linux-2.6.18-164.6.1/fs/Kconfig
===================================================================
---- linux-2.6.18-128.1.14.orig/fs/Kconfig 2009-06-19 12:33:10.000000000 -0600
-+++ linux-2.6.18-128.1.14/fs/Kconfig 2009-06-19 12:35:11.000000000 -0600
-@@ -206,6 +206,7 @@
+--- linux-2.6.18-164.6.1.orig/fs/Kconfig
++++ linux-2.6.18-164.6.1/fs/Kconfig
+@@ -142,6 +142,7 @@ source "fs/ext4/Kconfig"
config JBD
tristate
help
This is a generic journaling layer for block devices. It is
currently used by the ext3 and OCFS2 file systems, but it could
-Index: linux-2.6.18-128.1.14/Documentation/filesystems/ext3.txt
+Index: linux-2.6.18-164.6.1/Documentation/filesystems/ext3.txt
===================================================================
---- linux-2.6.18-128.1.14.orig/Documentation/filesystems/ext3.txt 2009-06-19 12:33:10.000000000 -0600
-+++ linux-2.6.18-128.1.14/Documentation/filesystems/ext3.txt 2009-06-19 12:35:11.000000000 -0600
-@@ -14,6 +14,16 @@
+--- linux-2.6.18-164.6.1.orig/Documentation/filesystems/ext3.txt
++++ linux-2.6.18-164.6.1/Documentation/filesystems/ext3.txt
+@@ -14,6 +14,16 @@ Options
When mounting an ext3 filesystem, the following option are accepted:
(*) == default