Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / jbd-journal-chksum-2.6.18-vanilla.patch
index 90ede90..2dca1c1 100644 (file)
@@ -188,7 +188,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 +206,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);
@@ -368,7 +369,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 +400,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 +408,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 +416,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 +443,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 +543,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.
         */