Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / jbd-journal-chksum-2.6-sles10.patch
index 4f4f069..3669a97 100644 (file)
@@ -80,9 +80,9 @@ Index: linux-2.6.16.53-0.16/fs/jbd/commit.c
 -      ret = sync_dirty_buffer(bh);
 +      ret = submit_bh(WRITE, bh);
 +
+       if (barrier_done)
+               clear_buffer_ordered(bh);
        /* 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
 @@ -153,12 +172,84 @@ static int journal_write_commit_record(j
                clear_buffer_ordered(bh);
                set_buffer_uptodate(bh);
@@ -181,7 +181,7 @@ Index: linux-2.6.16.53-0.16/fs/jbd/commit.c
  
        /*
         * First job: lock down the current transaction and wait for
-@@ -395,37 +488,14 @@ write_out_data:
+@@ -395,38 +488,15 @@ write_out_data:
        }
  
        /*
@@ -189,6 +189,7 @@ Index: linux-2.6.16.53-0.16/fs/jbd/commit.c
 +       * Wait for all previously submitted IO to complete if commit
 +       * record is to be written synchronously.
         */
+       spin_lock(&journal->j_list_lock);
 -      while (commit_transaction->t_locked_list) {
 -              struct buffer_head *bh;
 +      if (!JFS_HAS_INCOMPAT_FEATURE(journal,
@@ -360,7 +361,7 @@ Index: linux-2.6.16.53-0.16/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;
  }
  
@@ -391,6 +392,7 @@ Index: linux-2.6.16.53-0.16/fs/jbd/recovery.c
 +                      *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
 +                                   obh->b_size);
 +              }
++              put_bh(obh);
 +      }
 +      return 0;
 +}
@@ -398,7 +400,7 @@ Index: linux-2.6.16.53-0.16/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;
@@ -406,7 +408,7 @@ Index: linux-2.6.16.53-0.16/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
@@ -433,7 +435,7 @@ Index: linux-2.6.16.53-0.16/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:
@@ -533,7 +535,7 @@ Index: linux-2.6.16.53-0.16/fs/jbd/recovery.c
                        brelse(bh);
                        next_commit_ID++;
                        continue;
-@@ -543,9 +679,10 @@ static int do_one_pass(journal_t *journa
+@@ -543,9 +680,10 @@ static int do_one_pass(journal_t *journa
         * transaction marks the end of the valid log.
         */