aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/commit.c4
-rw-r--r--fs/jbd2/journal.c18
-rw-r--r--fs/jbd2/recovery.c12
-rw-r--r--fs/jbd2/revoke.c14
4 files changed, 24 insertions, 24 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 1a9ce8885220..70b2ae1ef281 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -272,7 +272,7 @@ write_out_data:
272} 272}
273 273
274static inline void write_tag_block(int tag_bytes, journal_block_tag_t *tag, 274static inline void write_tag_block(int tag_bytes, journal_block_tag_t *tag,
275 sector_t block) 275 unsigned long long block)
276{ 276{
277 tag->t_blocknr = cpu_to_be32(block & (u32)~0); 277 tag->t_blocknr = cpu_to_be32(block & (u32)~0);
278 if (tag_bytes > JBD_TAG_SIZE32) 278 if (tag_bytes > JBD_TAG_SIZE32)
@@ -293,7 +293,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
293 int bufs; 293 int bufs;
294 int flags; 294 int flags;
295 int err; 295 int err;
296 sector_t blocknr; 296 unsigned long long blocknr;
297 char *tagp = NULL; 297 char *tagp = NULL;
298 journal_header_t *header; 298 journal_header_t *header;
299 journal_block_tag_t *tag = NULL; 299 journal_block_tag_t *tag = NULL;
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 259e8365ea15..10db92ced014 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -271,7 +271,7 @@ static void journal_kill_thread(journal_t *journal)
271int jbd2_journal_write_metadata_buffer(transaction_t *transaction, 271int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
272 struct journal_head *jh_in, 272 struct journal_head *jh_in,
273 struct journal_head **jh_out, 273 struct journal_head **jh_out,
274 sector_t blocknr) 274 unsigned long long blocknr)
275{ 275{
276 int need_copy_out = 0; 276 int need_copy_out = 0;
277 int done_copy_out = 0; 277 int done_copy_out = 0;
@@ -555,7 +555,7 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid)
555 * Log buffer allocation routines: 555 * Log buffer allocation routines:
556 */ 556 */
557 557
558int jbd2_journal_next_log_block(journal_t *journal, sector_t *retp) 558int jbd2_journal_next_log_block(journal_t *journal, unsigned long long *retp)
559{ 559{
560 unsigned long blocknr; 560 unsigned long blocknr;
561 561
@@ -579,10 +579,10 @@ int jbd2_journal_next_log_block(journal_t *journal, sector_t *retp)
579 * ready. 579 * ready.
580 */ 580 */
581int jbd2_journal_bmap(journal_t *journal, unsigned long blocknr, 581int jbd2_journal_bmap(journal_t *journal, unsigned long blocknr,
582 sector_t *retp) 582 unsigned long long *retp)
583{ 583{
584 int err = 0; 584 int err = 0;
585 sector_t ret; 585 unsigned long long ret;
586 586
587 if (journal->j_inode) { 587 if (journal->j_inode) {
588 ret = bmap(journal->j_inode, blocknr); 588 ret = bmap(journal->j_inode, blocknr);
@@ -618,7 +618,7 @@ int jbd2_journal_bmap(journal_t *journal, unsigned long blocknr,
618struct journal_head *jbd2_journal_get_descriptor_buffer(journal_t *journal) 618struct journal_head *jbd2_journal_get_descriptor_buffer(journal_t *journal)
619{ 619{
620 struct buffer_head *bh; 620 struct buffer_head *bh;
621 sector_t blocknr; 621 unsigned long long blocknr;
622 int err; 622 int err;
623 623
624 err = jbd2_journal_next_log_block(journal, &blocknr); 624 err = jbd2_journal_next_log_block(journal, &blocknr);
@@ -706,7 +706,7 @@ fail:
706 */ 706 */
707journal_t * jbd2_journal_init_dev(struct block_device *bdev, 707journal_t * jbd2_journal_init_dev(struct block_device *bdev,
708 struct block_device *fs_dev, 708 struct block_device *fs_dev,
709 sector_t start, int len, int blocksize) 709 unsigned long long start, int len, int blocksize)
710{ 710{
711 journal_t *journal = journal_init_common(); 711 journal_t *journal = journal_init_common();
712 struct buffer_head *bh; 712 struct buffer_head *bh;
@@ -753,7 +753,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode)
753 journal_t *journal = journal_init_common(); 753 journal_t *journal = journal_init_common();
754 int err; 754 int err;
755 int n; 755 int n;
756 sector_t blocknr; 756 unsigned long long blocknr;
757 757
758 if (!journal) 758 if (!journal)
759 return NULL; 759 return NULL;
@@ -819,7 +819,7 @@ static void journal_fail_superblock (journal_t *journal)
819static int journal_reset(journal_t *journal) 819static int journal_reset(journal_t *journal)
820{ 820{
821 journal_superblock_t *sb = journal->j_superblock; 821 journal_superblock_t *sb = journal->j_superblock;
822 sector_t first, last; 822 unsigned long long first, last;
823 823
824 first = be32_to_cpu(sb->s_first); 824 first = be32_to_cpu(sb->s_first);
825 last = be32_to_cpu(sb->s_maxlen); 825 last = be32_to_cpu(sb->s_maxlen);
@@ -853,7 +853,7 @@ static int journal_reset(journal_t *journal)
853 **/ 853 **/
854int jbd2_journal_create(journal_t *journal) 854int jbd2_journal_create(journal_t *journal)
855{ 855{
856 sector_t blocknr; 856 unsigned long long blocknr;
857 struct buffer_head *bh; 857 struct buffer_head *bh;
858 journal_superblock_t *sb; 858 journal_superblock_t *sb;
859 int i, err; 859 int i, err;
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 52054a83e717..9f10acafaf70 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -70,7 +70,7 @@ static int do_readahead(journal_t *journal, unsigned int start)
70{ 70{
71 int err; 71 int err;
72 unsigned int max, nbufs, next; 72 unsigned int max, nbufs, next;
73 sector_t blocknr; 73 unsigned long long blocknr;
74 struct buffer_head *bh; 74 struct buffer_head *bh;
75 75
76 struct buffer_head * bufs[MAXBUF]; 76 struct buffer_head * bufs[MAXBUF];
@@ -132,7 +132,7 @@ static int jread(struct buffer_head **bhp, journal_t *journal,
132 unsigned int offset) 132 unsigned int offset)
133{ 133{
134 int err; 134 int err;
135 sector_t blocknr; 135 unsigned long long blocknr;
136 struct buffer_head *bh; 136 struct buffer_head *bh;
137 137
138 *bhp = NULL; 138 *bhp = NULL;
@@ -308,9 +308,9 @@ int jbd2_journal_skip_recovery(journal_t *journal)
308 return err; 308 return err;
309} 309}
310 310
311static inline sector_t read_tag_block(int tag_bytes, journal_block_tag_t *tag) 311static inline unsigned long long read_tag_block(int tag_bytes, journal_block_tag_t *tag)
312{ 312{
313 sector_t block = be32_to_cpu(tag->t_blocknr); 313 unsigned long long block = be32_to_cpu(tag->t_blocknr);
314 if (tag_bytes > JBD_TAG_SIZE32) 314 if (tag_bytes > JBD_TAG_SIZE32)
315 block |= (u64)be32_to_cpu(tag->t_blocknr_high) << 32; 315 block |= (u64)be32_to_cpu(tag->t_blocknr_high) << 32;
316 return block; 316 return block;
@@ -452,7 +452,7 @@ static int do_one_pass(journal_t *journal,
452 "block %ld in log\n", 452 "block %ld in log\n",
453 err, io_block); 453 err, io_block);
454 } else { 454 } else {
455 sector_t blocknr; 455 unsigned long long blocknr;
456 456
457 J_ASSERT(obh != NULL); 457 J_ASSERT(obh != NULL);
458 blocknr = read_tag_block(tag_bytes, 458 blocknr = read_tag_block(tag_bytes,
@@ -592,7 +592,7 @@ static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
592 record_len = 8; 592 record_len = 8;
593 593
594 while (offset + record_len <= max) { 594 while (offset + record_len <= max) {
595 sector_t blocknr; 595 unsigned long long blocknr;
596 int err; 596 int err;
597 597
598 if (record_len == 4) 598 if (record_len == 4)
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c
index 3310a1d7ace9..380d19917f37 100644
--- a/fs/jbd2/revoke.c
+++ b/fs/jbd2/revoke.c
@@ -81,7 +81,7 @@ struct jbd2_revoke_record_s
81{ 81{
82 struct list_head hash; 82 struct list_head hash;
83 tid_t sequence; /* Used for recovery only */ 83 tid_t sequence; /* Used for recovery only */
84 sector_t blocknr; 84 unsigned long long blocknr;
85}; 85};
86 86
87 87
@@ -106,7 +106,7 @@ static void flush_descriptor(journal_t *, struct journal_head *, int);
106/* Utility functions to maintain the revoke table */ 106/* Utility functions to maintain the revoke table */
107 107
108/* Borrowed from buffer.c: this is a tried and tested block hash function */ 108/* Borrowed from buffer.c: this is a tried and tested block hash function */
109static inline int hash(journal_t *journal, sector_t block) 109static inline int hash(journal_t *journal, unsigned long long block)
110{ 110{
111 struct jbd2_revoke_table_s *table = journal->j_revoke; 111 struct jbd2_revoke_table_s *table = journal->j_revoke;
112 int hash_shift = table->hash_shift; 112 int hash_shift = table->hash_shift;
@@ -117,7 +117,7 @@ static inline int hash(journal_t *journal, sector_t block)
117 (hash << (hash_shift - 12))) & (table->hash_size - 1); 117 (hash << (hash_shift - 12))) & (table->hash_size - 1);
118} 118}
119 119
120static int insert_revoke_hash(journal_t *journal, sector_t blocknr, 120static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr,
121 tid_t seq) 121 tid_t seq)
122{ 122{
123 struct list_head *hash_list; 123 struct list_head *hash_list;
@@ -147,7 +147,7 @@ oom:
147/* Find a revoke record in the journal's hash table. */ 147/* Find a revoke record in the journal's hash table. */
148 148
149static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal, 149static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal,
150 sector_t blocknr) 150 unsigned long long blocknr)
151{ 151{
152 struct list_head *hash_list; 152 struct list_head *hash_list;
153 struct jbd2_revoke_record_s *record; 153 struct jbd2_revoke_record_s *record;
@@ -326,7 +326,7 @@ void jbd2_journal_destroy_revoke(journal_t *journal)
326 * by one. 326 * by one.
327 */ 327 */
328 328
329int jbd2_journal_revoke(handle_t *handle, sector_t blocknr, 329int jbd2_journal_revoke(handle_t *handle, unsigned long long blocknr,
330 struct buffer_head *bh_in) 330 struct buffer_head *bh_in)
331{ 331{
332 struct buffer_head *bh = NULL; 332 struct buffer_head *bh = NULL;
@@ -650,7 +650,7 @@ static void flush_descriptor(journal_t *journal,
650 */ 650 */
651 651
652int jbd2_journal_set_revoke(journal_t *journal, 652int jbd2_journal_set_revoke(journal_t *journal,
653 sector_t blocknr, 653 unsigned long long blocknr,
654 tid_t sequence) 654 tid_t sequence)
655{ 655{
656 struct jbd2_revoke_record_s *record; 656 struct jbd2_revoke_record_s *record;
@@ -674,7 +674,7 @@ int jbd2_journal_set_revoke(journal_t *journal,
674 */ 674 */
675 675
676int jbd2_journal_test_revoke(journal_t *journal, 676int jbd2_journal_test_revoke(journal_t *journal,
677 sector_t blocknr, 677 unsigned long long blocknr,
678 tid_t sequence) 678 tid_t sequence)
679{ 679{
680 struct jbd2_revoke_record_s *record; 680 struct jbd2_revoke_record_s *record;