-Index: linux-2.6.16.60-0.37/fs/jbd/commit.c
+Index: linux-2.6.16/fs/jbd/commit.c
===================================================================
---- linux-2.6.16.60-0.37.orig/fs/jbd/commit.c 2009-06-02 23:33:33.000000000 -0600
-+++ linux-2.6.16.60-0.37/fs/jbd/commit.c 2009-06-02 23:33:54.000000000 -0600
+--- linux-2.6.16.orig/fs/jbd/commit.c
++++ linux-2.6.16/fs/jbd/commit.c
@@ -22,6 +22,7 @@
#include <linux/pagemap.h>
#include <linux/smp_lock.h>
/*
* Default IO end handler for temporary BJ_IO buffer_heads.
-@@ -94,19 +95,23 @@
+@@ -94,19 +95,23 @@ static int inverted_lock(journal_t *jour
return 1;
}
int barrier_done = 0;
if (is_journal_aborted(journal))
-@@ -118,21 +123,34 @@
+@@ -118,21 +123,34 @@ static int journal_write_commit_record(j
bh = jh2bh(descriptor);
if (barrier_done)
clear_buffer_ordered(bh);
/* is it possible for another commit to fail at roughly
-@@ -154,12 +172,84 @@
+@@ -152,14 +170,87 @@ static int journal_write_commit_record(j
+ spin_unlock(&journal->j_state_lock);
+
/* And try again, without the barrier */
++ lock_buffer(bh);
set_buffer_uptodate(bh);
set_buffer_dirty(bh);
- ret = sync_dirty_buffer(bh);
}
void journal_do_submit_data(struct buffer_head **wbuf, int bufs)
-@@ -296,6 +386,8 @@
+@@ -296,6 +387,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
-@@ -439,38 +531,15 @@
+@@ -439,38 +532,15 @@ void journal_commit_transaction(journal_
journal_submit_data_buffers(journal, commit_transaction);
/*
spin_unlock(&journal->j_list_lock);
if (err)
-@@ -643,6 +712,16 @@
+@@ -643,6 +713,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);
-@@ -659,6 +738,23 @@
+@@ -659,6 +739,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
-@@ -757,9 +853,15 @@
+@@ -757,9 +854,15 @@ wait_for_iobuf:
}
jbd_debug(3, "JBD: commit phase 6\n");
if (err)
__journal_abort_hard(journal);
-Index: linux-2.6.16.60-0.37/fs/jbd/recovery.c
+Index: linux-2.6.16/fs/jbd/recovery.c
===================================================================
---- linux-2.6.16.60-0.37.orig/fs/jbd/recovery.c 2006-03-19 22:53:29.000000000 -0700
-+++ linux-2.6.16.60-0.37/fs/jbd/recovery.c 2009-06-02 23:33:54.000000000 -0600
+--- linux-2.6.16.orig/fs/jbd/recovery.c
++++ linux-2.6.16/fs/jbd/recovery.c
@@ -21,6 +21,7 @@
#include <linux/jbd.h>
#include <linux/errno.h>
#endif
/*
-@@ -307,6 +308,38 @@
+@@ -307,6 +308,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)
{
-@@ -318,6 +351,7 @@
+@@ -318,6 +351,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;
-@@ -409,9 +443,24 @@
+@@ -409,9 +443,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);
-@@ -506,9 +555,97 @@
+@@ -506,9 +555,97 @@ static int do_one_pass(journal_t *journa
continue;
case JFS_COMMIT_BLOCK:
brelse(bh);
next_commit_ID++;
continue;
-@@ -543,9 +680,10 @@
+@@ -543,9 +680,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.16.60-0.37/fs/jbd/journal.c
+Index: linux-2.6.16/fs/jbd/journal.c
===================================================================
---- linux-2.6.16.60-0.37.orig/fs/jbd/journal.c 2009-06-02 23:33:33.000000000 -0600
-+++ linux-2.6.16.60-0.37/fs/jbd/journal.c 2009-06-02 23:33:54.000000000 -0600
-@@ -64,6 +64,7 @@
+--- linux-2.6.16.orig/fs/jbd/journal.c
++++ linux-2.6.16/fs/jbd/journal.c
+@@ -64,6 +64,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);
-@@ -1565,6 +1566,33 @@
+@@ -1565,6 +1566,33 @@ int journal_set_features (journal_t *jou
return 1;
}
/**
* int journal_update_format () - Update on-disk journal structure.
-Index: linux-2.6.16.60-0.37/fs/Kconfig
+Index: linux-2.6.16/fs/Kconfig
===================================================================
---- linux-2.6.16.60-0.37.orig/fs/Kconfig 2009-03-24 05:46:35.000000000 -0700
-+++ linux-2.6.16.60-0.37/fs/Kconfig 2009-06-02 23:33:54.000000000 -0600
-@@ -140,6 +140,7 @@
+--- linux-2.6.16.orig/fs/Kconfig
++++ linux-2.6.16/fs/Kconfig
+@@ -140,6 +140,7 @@ config EXT3_FS_SECURITY
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.16.60-0.37/include/linux/jbd.h
+Index: linux-2.6.16/include/linux/jbd.h
===================================================================
---- linux-2.6.16.60-0.37.orig/include/linux/jbd.h 2009-06-02 23:33:33.000000000 -0600
-+++ linux-2.6.16.60-0.37/include/linux/jbd.h 2009-06-02 23:33:54.000000000 -0600
-@@ -142,6 +142,29 @@
+--- linux-2.6.16.orig/include/linux/jbd.h
++++ linux-2.6.16/include/linux/jbd.h
+@@ -142,6 +142,29 @@ typedef struct journal_header_s
__be32 h_sequence;
} journal_header_t;
/*
* The block tag: used to describe a single buffer in the journal
-@@ -228,12 +251,16 @@
+@@ -228,12 +251,16 @@ typedef struct journal_superblock_s
((j)->j_format_version >= 2 && \
((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
#ifdef __KERNEL__
-@@ -1041,6 +1068,8 @@
+@@ -1041,6 +1068,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);
extern void journal_destroy (journal_t *);
-Index: linux-2.6.16.60-0.37/Documentation/filesystems/ext3.txt
+Index: linux-2.6.16/Documentation/filesystems/ext3.txt
===================================================================
---- linux-2.6.16.60-0.37.orig/Documentation/filesystems/ext3.txt 2006-03-19 22:53:29.000000000 -0700
-+++ linux-2.6.16.60-0.37/Documentation/filesystems/ext3.txt 2009-06-02 23:33:54.000000000 -0600
-@@ -14,6 +14,16 @@
+--- linux-2.6.16.orig/Documentation/filesystems/ext3.txt
++++ linux-2.6.16/Documentation/filesystems/ext3.txt
+@@ -14,6 +14,16 @@ Options
When mounting an ext3 filesystem, the following option are accepted:
(*) == default