Lines Matching refs:journal

42 static int do_one_pass(journal_t *journal,
70 static int do_readahead(journal_t *journal, unsigned int start) in do_readahead() argument
80 max = start + (128 * 1024 / journal->j_blocksize); in do_readahead()
81 if (max > journal->j_maxlen) in do_readahead()
82 max = journal->j_maxlen; in do_readahead()
90 err = journal_bmap(journal, next, &blocknr); in do_readahead()
98 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead()
132 static int jread(struct buffer_head **bhp, journal_t *journal, in jread() argument
141 if (offset >= journal->j_maxlen) { in jread()
146 err = journal_bmap(journal, offset, &blocknr); in jread()
154 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in jread()
162 do_readahead(journal, offset); in jread()
207 #define wrap(journal, var) \ argument
209 if (var >= (journal)->j_last) \
210 var -= ((journal)->j_last - (journal)->j_first); \
225 int journal_recover(journal_t *journal) in journal_recover() argument
233 sb = journal->j_superblock; in journal_recover()
244 journal->j_transaction_sequence = be32_to_cpu(sb->s_sequence) + 1; in journal_recover()
248 err = do_one_pass(journal, &info, PASS_SCAN); in journal_recover()
250 err = do_one_pass(journal, &info, PASS_REVOKE); in journal_recover()
252 err = do_one_pass(journal, &info, PASS_REPLAY); in journal_recover()
262 journal->j_transaction_sequence = ++info.end_transaction; in journal_recover()
264 journal_clear_revoke(journal); in journal_recover()
265 sync_blockdev(journal->j_fs_dev); in journal_recover()
282 int journal_skip_recovery(journal_t *journal) in journal_skip_recovery() argument
290 sb = journal->j_superblock; in journal_skip_recovery()
292 err = do_one_pass(journal, &info, PASS_SCAN); in journal_skip_recovery()
296 ++journal->j_transaction_sequence; in journal_skip_recovery()
304 journal->j_transaction_sequence = ++info.end_transaction; in journal_skip_recovery()
307 journal->j_tail = 0; in journal_skip_recovery()
311 static int do_one_pass(journal_t *journal, in do_one_pass() argument
325 MAX_BLOCKS_PER_DESC = ((journal->j_blocksize-sizeof(journal_header_t)) in do_one_pass()
334 sb = journal->j_superblock; in do_one_pass()
369 next_commit_ID, next_log_block, journal->j_last); in do_one_pass()
376 err = jread(&bh, journal, next_log_block); in do_one_pass()
381 wrap(journal, next_log_block); in do_one_pass()
417 count_tags(bh, journal->j_blocksize); in do_one_pass()
418 wrap(journal, next_log_block); in do_one_pass()
429 <= journal->j_blocksize) { in do_one_pass()
436 wrap(journal, next_log_block); in do_one_pass()
437 err = jread(&obh, journal, io_block); in do_one_pass()
456 (journal, blocknr, in do_one_pass()
465 nbh = __getblk(journal->j_fs_dev, in do_one_pass()
467 journal->j_blocksize); in do_one_pass()
480 journal->j_blocksize); in do_one_pass()
525 err = scan_revoke_records(journal, bh, in do_one_pass()
571 static int scan_revoke_records(journal_t *journal, struct buffer_head *bh, in scan_revoke_records() argument
587 err = journal_set_revoke(journal, blocknr, sequence); in scan_revoke_records()