X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fkernel_patches%2Fpatches%2Fjbd-journal-chksum-2.6.18-vanilla.patch;h=3c20f0c1ce4a5f709dd3f8084e72a1ee5bf96aa1;hb=20a6f2df5afc45a764c6ffc842e33046531f9e5e;hp=7cb1b153f5908f99fc0c97642055cad2b32dbd41;hpb=983df04a97067b80f2282f0deca43bae09c68748;p=fs%2Flustre-release.git diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch index 7cb1b15..3c20f0c 100644 --- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch +++ b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch @@ -38,7 +38,7 @@ Index: linux-2.6.18.8/fs/jbd/commit.c int barrier_done = 0; if (is_journal_aborted(journal)) -@@ -119,21 +124,35 @@ static int journal_write_commit_record(j +@@ -119,21 +124,34 @@ static int journal_write_commit_record(j bh = jh2bh(descriptor); @@ -63,7 +63,6 @@ Index: linux-2.6.18.8/fs/jbd/commit.c - JBUFFER_TRACE(descriptor, "write commit block"); + JBUFFER_TRACE(descriptor, "submit commit block"); + lock_buffer(bh); -+ get_bh(bh); + set_buffer_dirty(bh); - if (journal->j_flags & JFS_BARRIER) { @@ -188,7 +187,7 @@ Index: linux-2.6.18.8/fs/jbd/commit.c /* * First job: lock down the current transaction and wait for -@@ -439,38 +532,14 @@ void journal_commit_transaction(journal_ +@@ -439,39 +532,14 @@ void journal_commit_transaction(journal_ journal_submit_data_buffers(journal, commit_transaction); /* @@ -206,10 +205,11 @@ Index: linux-2.6.18.8/fs/jbd/commit.c - if (buffer_locked(bh)) { - spin_unlock(&journal->j_list_lock); - wait_on_buffer(bh); -- if (unlikely(!buffer_uptodate(bh))) -- err = -EIO; - spin_lock(&journal->j_list_lock); - } +- if (unlikely(!buffer_uptodate(bh))) +- err = -EIO; +- - if (!inverted_lock(journal, bh)) { - put_bh(bh); - spin_lock(&journal->j_list_lock); @@ -342,8 +342,8 @@ Index: linux-2.6.18.8/include/linux/jbd.h +#define JFS_KNOWN_COMPAT_FEATURES JFS_FEATURE_COMPAT_CHECKSUM #define JFS_KNOWN_ROCOMPAT_FEATURES 0 -#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE -+#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE | \ -+ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT ++#define JFS_KNOWN_INCOMPAT_FEATURES (JFS_FEATURE_INCOMPAT_REVOKE | \ ++ JFS_FEATURE_INCOMPAT_ASYNC_COMMIT) #ifdef __KERNEL__ @@ -368,7 +368,7 @@ Index: linux-2.6.18.8/fs/jbd/recovery.c #endif /* -@@ -307,6 +308,37 @@ int journal_skip_recovery(journal_t *jou +@@ -307,6 +308,38 @@ int journal_skip_recovery(journal_t *jou return err; } @@ -399,6 +399,7 @@ Index: linux-2.6.18.8/fs/jbd/recovery.c + *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data, + obh->b_size); + } ++ put_bh(obh); + } + return 0; +} @@ -406,7 +407,7 @@ Index: linux-2.6.18.8/fs/jbd/recovery.c static int do_one_pass(journal_t *journal, struct recovery_info *info, enum passtype pass) { -@@ -318,6 +350,7 @@ static int do_one_pass(journal_t *journa +@@ -318,6 +351,7 @@ static int do_one_pass(journal_t *journa struct buffer_head * bh; unsigned int sequence; int blocktype; @@ -414,7 +415,7 @@ Index: linux-2.6.18.8/fs/jbd/recovery.c /* Precompute the maximum metadata descriptors in a descriptor block */ int MAX_BLOCKS_PER_DESC; -@@ -409,9 +442,24 @@ static int do_one_pass(journal_t *journa +@@ -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 @@ -441,7 +442,7 @@ Index: linux-2.6.18.8/fs/jbd/recovery.c next_log_block += count_tags(bh, journal->j_blocksize); wrap(journal, next_log_block); -@@ -506,9 +554,97 @@ static int do_one_pass(journal_t *journa +@@ -506,9 +555,97 @@ static int do_one_pass(journal_t *journa continue; case JFS_COMMIT_BLOCK: @@ -541,7 +542,7 @@ Index: linux-2.6.18.8/fs/jbd/recovery.c brelse(bh); next_commit_ID++; continue; -@@ -544,9 +680,10 @@ static int do_one_pass(journal_t *journa +@@ -544,9 +681,10 @@ static int do_one_pass(journal_t *journa * transaction marks the end of the valid log. */