Lines Matching defs:journal
59 * [3] Lock the journal by calling jbd2_journal_lock_updates(). This ensures
64 * [5] Unlock the journal by calling jbd2_journal_unlock_updates(). This allows
167 * journal handles to make sure all the updates it does during the replay
1173 static int ext4_fc_flush_data(journal_t *journal)
1175 struct super_block *sb = journal->j_private;
1181 ret = jbd2_submit_inode_data(journal, READ_ONCE(ei->jinode));
1187 ret = jbd2_wait_inode_data(journal, READ_ONCE(ei->jinode));
1196 static int ext4_fc_commit_dentry_updates(journal_t *journal, u32 *crc)
1198 struct super_block *sb = journal->j_private;
1254 static int ext4_fc_snapshot_inodes(journal_t *journal, struct inode **inodes,
1260 struct super_block *sb = journal->j_private;
1339 static int ext4_fc_perform_commit(journal_t *journal, tid_t commit_tid)
1341 struct super_block *sb = journal->j_private;
1372 ret = ext4_fc_flush_data(journal);
1412 jbd2_journal_lock_updates(journal);
1415 * The journal is now locked. No more handles can start and all the
1427 ret = ext4_fc_snapshot_inodes(journal, inodes, inodes_size,
1429 jbd2_journal_unlock_updates(journal);
1444 * Step 5: If file system device is different from journal device,
1447 if (journal->j_fs_dev != journal->j_dev)
1448 blkdev_issue_flush(journal->j_fs_dev);
1469 ret = ext4_fc_commit_dentry_updates(journal, &crc);
1586 int ext4_fc_commit(journal_t *journal, tid_t commit_tid)
1588 struct super_block *sb = journal->j_private;
1590 int nblks = 0, ret, bsize = journal->j_blocksize;
1597 return jbd2_complete_transaction(journal, commit_tid);
1605 ret = jbd2_fc_begin_commit(journal, commit_tid);
1609 tid_gt(commit_tid, journal->j_commit_sequence))
1621 return jbd2_complete_transaction(journal, commit_tid);
1625 * After establishing journal barrier via jbd2_fc_begin_commit(), check
1635 * elevate the priority to match that of the journal thread.
1637 if (journal->j_task->io_context)
1643 ret = ext4_fc_perform_commit(journal, commit_tid);
1652 ret = jbd2_fc_wait_bufs(journal, nblks);
1658 ret = jbd2_fc_end_commit(journal);
1670 ret = jbd2_fc_end_commit_fallback(journal);
1679 static void ext4_fc_cleanup(journal_t *journal, int full, tid_t tid)
1681 struct super_block *sb = journal->j_private;
1690 trace_ext4_fc_cleanup(journal, full, tid);
1691 jbd2_fc_release_bufs(journal);
2458 static int ext4_fc_replay_scan(journal_t *journal,
2462 struct super_block *sb = journal->j_private;
2476 end = start + journal->j_blocksize;
2581 static int ext4_fc_replay(journal_t *journal, struct buffer_head *bh,
2584 struct super_block *sb = journal->j_private;
2594 return ext4_fc_replay_scan(journal, bh, off, expected_tid);
2615 end = start + journal->j_blocksize;
2673 void ext4_fc_init(struct super_block *sb, journal_t *journal)
2680 journal->j_fc_replay_callback = ext4_fc_replay;
2683 journal->j_fc_cleanup_callback = ext4_fc_cleanup;