aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2012-05-22 22:43:41 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-05-22 22:43:41 -0400
commit8f888ef846d4481e24c74b4a91ece771d2bcbcb5 (patch)
treebd037514671c52cea95426ba417a6c1b4b59f96a /fs/jbd2
parentf32aaf2d2b996b14e993da1c23f7ee22ea7333a3 (diff)
jbd2: change disk layout for metadata checksumming
Define flags and allocate space in on-disk journal structures to support checksumming of journal metadata. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/commit.c4
-rw-r--r--fs/jbd2/recovery.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 840f70f50792..69d780310aea 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -627,7 +627,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
627 627
628 tag = (journal_block_tag_t *) tagp; 628 tag = (journal_block_tag_t *) tagp;
629 write_tag_block(tag_bytes, tag, jh2bh(jh)->b_blocknr); 629 write_tag_block(tag_bytes, tag, jh2bh(jh)->b_blocknr);
630 tag->t_flags = cpu_to_be32(tag_flag); 630 tag->t_flags = cpu_to_be16(tag_flag);
631 tagp += tag_bytes; 631 tagp += tag_bytes;
632 space_left -= tag_bytes; 632 space_left -= tag_bytes;
633 633
@@ -651,7 +651,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
651 submitting the IOs. "tag" still points to 651 submitting the IOs. "tag" still points to
652 the last tag we set up. */ 652 the last tag we set up. */
653 653
654 tag->t_flags |= cpu_to_be32(JBD2_FLAG_LAST_TAG); 654 tag->t_flags |= cpu_to_be16(JBD2_FLAG_LAST_TAG);
655 655
656start_journal_io: 656start_journal_io:
657 for (i = 0; i < bufs; i++) { 657 for (i = 0; i < bufs; i++) {
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index c1a03354a22f..980f3d6b5f88 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -193,10 +193,10 @@ static int count_tags(journal_t *journal, struct buffer_head *bh)
193 193
194 nr++; 194 nr++;
195 tagp += tag_bytes; 195 tagp += tag_bytes;
196 if (!(tag->t_flags & cpu_to_be32(JBD2_FLAG_SAME_UUID))) 196 if (!(tag->t_flags & cpu_to_be16(JBD2_FLAG_SAME_UUID)))
197 tagp += 16; 197 tagp += 16;
198 198
199 if (tag->t_flags & cpu_to_be32(JBD2_FLAG_LAST_TAG)) 199 if (tag->t_flags & cpu_to_be16(JBD2_FLAG_LAST_TAG))
200 break; 200 break;
201 } 201 }
202 202
@@ -485,7 +485,7 @@ static int do_one_pass(journal_t *journal,
485 unsigned long io_block; 485 unsigned long io_block;
486 486
487 tag = (journal_block_tag_t *) tagp; 487 tag = (journal_block_tag_t *) tagp;
488 flags = be32_to_cpu(tag->t_flags); 488 flags = be16_to_cpu(tag->t_flags);
489 489
490 io_block = next_log_block++; 490 io_block = next_log_block++;
491 wrap(journal, next_log_block); 491 wrap(journal, next_log_block);