• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/fs/jbd/

Lines Matching refs:journal

40 static int do_one_pass(journal_t *journal,
56 * When reading from the journal, we are going through the block device
68 static int do_readahead(journal_t *journal, unsigned int start)
78 max = start + (128 * 1024 / journal->j_blocksize);
79 if (max > journal->j_maxlen)
80 max = journal->j_maxlen;
88 err = journal_bmap(journal, next, &blocknr);
96 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
127 * Read a block from the journal
130 static int jread(struct buffer_head **bhp, journal_t *journal,
139 if (offset >= journal->j_maxlen) {
140 printk(KERN_ERR "JBD: corrupted journal superblock\n");
144 err = journal_bmap(journal, offset, &blocknr);
152 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
160 do_readahead(journal, offset);
177 * Count the number of in-use tags in a journal descriptor block.
205 #define wrap(journal, var) \
207 if (var >= (journal)->j_last) \
208 var -= ((journal)->j_last - (journal)->j_first); \
212 * journal_recover - recovers a on-disk journal
213 * @journal: the journal to recover
223 int journal_recover(journal_t *journal)
231 sb = journal->j_superblock;
234 * The journal superblock's s_start field (the current log head)
235 * is always zero if, and only if, the journal was cleanly
242 journal->j_transaction_sequence = be32_to_cpu(sb->s_sequence) + 1;
246 err = do_one_pass(journal, &info, PASS_SCAN);
248 err = do_one_pass(journal, &info, PASS_REVOKE);
250 err = do_one_pass(journal, &info, PASS_REPLAY);
260 journal->j_transaction_sequence = ++info.end_transaction;
262 journal_clear_revoke(journal);
263 err2 = sync_blockdev(journal->j_fs_dev);
271 * journal_skip_recovery - Start journal and wipe exiting records
272 * @journal: journal to startup
274 * Locate any valid recovery information from the journal and set up the
275 * journal structures in memory to ignore it (presumably because the
279 * We perform one pass over the journal to allow us to tell the user how
281 * the journal transaction sequence numbers to the next unused ID.
283 int journal_skip_recovery(journal_t *journal)
290 err = do_one_pass(journal, &info, PASS_SCAN);
293 printk(KERN_ERR "JBD: error %d scanning journal\n", err);
294 ++journal->j_transaction_sequence;
298 be32_to_cpu(journal->j_superblock->s_sequence);
301 "JBD: ignoring %d transaction%s from the journal.\n",
303 journal->j_transaction_sequence = ++info.end_transaction;
306 journal->j_tail = 0;
310 static int do_one_pass(journal_t *journal,
328 sb = journal->j_superblock;
363 next_commit_ID, next_log_block, journal->j_last);
370 err = jread(&bh, journal, next_log_block);
375 wrap(journal, next_log_block);
411 count_tags(bh, journal->j_blocksize);
412 wrap(journal, next_log_block);
423 <= journal->j_blocksize) {
430 wrap(journal, next_log_block);
431 err = jread(&obh, journal, io_block);
450 (journal, blocknr,
459 nbh = __getblk(journal->j_fs_dev,
461 journal->j_blocksize);
474 journal->j_blocksize);
519 err = scan_revoke_records(journal, bh,
565 static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
581 err = journal_set_revoke(journal, blocknr, sequence);