• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/hfsplus_journal/

Lines Matching defs:journal

37 static int do_one_pass(hfsplus_jbd_t *journal,
53 * When reading from the journal, we are going through the block device
65 static int do_readahead(hfsplus_jbd_t *journal, unsigned int start)
75 max = start + (128 * 1024 / journal->j_blocksize);
76 if (max > journal->j_maxlen)
77 max = journal->j_maxlen;
85 err = hfsplus_jbd_bmap(journal, next, &blocknr);
93 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
124 * Read a block from the journal
127 static int jread(struct buffer_head **bhp, hfsplus_jbd_t *journal,
136 if (offset >= journal->j_maxlen) {
137 printk(KERN_ERR "JBD: corrupted journal superblock\n");
141 err = hfsplus_jbd_bmap(journal, offset, &blocknr);
149 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
157 do_readahead(journal, offset);
174 * Count the number of in-use tags in a journal descriptor block.
202 #define wrap(journal, var) \
204 if (var >= (journal)->j_last) \
205 var -= ((journal)->j_last - (journal)->j_first); \
209 * hfsplus_jbd_recover - recovers a on-disk journal
210 * @journal: the journal to recover
220 int hfsplus_jbd_recover(hfsplus_jbd_t *journal)
228 sb = journal->j_superblock;
231 * The journal superblock's s_start field (the current log head)
232 * is always zero if, and only if, the journal was cleanly
239 journal->j_transaction_sequence = be32_to_cpu(sb->s_sequence) + 1;
243 err = do_one_pass(journal, &info, PASS_SCAN);
245 err = do_one_pass(journal, &info, PASS_REVOKE);
247 err = do_one_pass(journal, &info, PASS_REPLAY);
257 journal->j_transaction_sequence = ++info.end_transaction;
259 hfsplus_jbd_clear_revoke(journal);
260 sync_blockdev(journal->j_fs_dev);
265 * hfsplus_jbd_skip_recovery - Start journal and wipe exiting records
266 * @journal: journal to startup
268 * Locate any valid recovery information from the journal and set up the
269 * journal structures in memory to ignore it (presumably because the
273 * We perform one pass over the journal to allow us to tell the user how
275 * the journal transaction sequence numbers to the next unused ID.
277 int hfsplus_jbd_skip_recovery(hfsplus_jbd_t *journal)
285 sb = journal->j_superblock;
287 err = do_one_pass(journal, &info, PASS_SCAN);
290 printk(KERN_ERR "JBD: error %d scanning journal\n", err);
291 ++journal->j_transaction_sequence;
295 "JBD: ignoring %d transaction%s from the journal.\n",
297 journal->j_transaction_sequence = ++info.end_transaction;
300 journal->j_tail = 0;
304 static int do_one_pass(hfsplus_jbd_t *journal,
318 MAX_BLOCKS_PER_DESC = ((journal->j_blocksize-sizeof(hfsplus_jbd_header_t))
327 sb = journal->j_superblock;
362 next_commit_ID, next_log_block, journal->j_last);
369 err = jread(&bh, journal, next_log_block);
374 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);
520 err = scan_revoke_records(journal, bh,
565 static int scan_revoke_records(hfsplus_jbd_t *journal, struct buffer_head *bh,
581 err = hfsplus_jbd_set_revoke(journal, blocknr, sequence);