Lines Matching refs:journal
452 static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) in ext4_journal_commit_callback() argument
454 struct super_block *sb = journal->j_private; in ext4_journal_commit_callback()
456 int error = is_journal_aborted(journal); in ext4_journal_commit_callback()
653 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_handle_error() local
662 if (journal) in ext4_handle_error()
663 jbd2_journal_abort(journal, -EIO); in ext4_handle_error()
674 if (continue_fs && journal) in ext4_handle_error()
706 journal_t *journal = sbi->s_journal; in flush_stashed_error_work() local
717 if (!sb_rdonly(sbi->s_sb) && journal) { in flush_stashed_error_work()
719 handle = jbd2_journal_start(journal, 1); in flush_stashed_error_work()
5683 static void ext4_init_journal_params(struct super_block *sb, journal_t *journal) in ext4_init_journal_params() argument
5687 journal->j_commit_interval = sbi->s_commit_interval; in ext4_init_journal_params()
5688 journal->j_min_batch_time = sbi->s_min_batch_time; in ext4_init_journal_params()
5689 journal->j_max_batch_time = sbi->s_max_batch_time; in ext4_init_journal_params()
5690 ext4_fc_init(sb, journal); in ext4_init_journal_params()
5692 write_lock(&journal->j_state_lock); in ext4_init_journal_params()
5694 journal->j_flags |= JBD2_BARRIER; in ext4_init_journal_params()
5696 journal->j_flags &= ~JBD2_BARRIER; in ext4_init_journal_params()
5698 journal->j_flags |= JBD2_ABORT_ON_SYNCDATA_ERR; in ext4_init_journal_params()
5700 journal->j_flags &= ~JBD2_ABORT_ON_SYNCDATA_ERR; in ext4_init_journal_params()
5701 write_unlock(&journal->j_state_lock); in ext4_init_journal_params()
5740 journal_t *journal; in ext4_get_journal() local
5749 journal = jbd2_journal_init_inode(journal_inode); in ext4_get_journal()
5750 if (!journal) { in ext4_get_journal()
5755 journal->j_private = sb; in ext4_get_journal()
5756 ext4_init_journal_params(sb, journal); in ext4_get_journal()
5757 return journal; in ext4_get_journal()
5764 journal_t *journal; in ext4_get_dev_journal() local
5826 journal = jbd2_journal_init_dev(bdev, sb->s_bdev, in ext4_get_dev_journal()
5828 if (!journal) { in ext4_get_dev_journal()
5832 journal->j_private = sb; in ext4_get_dev_journal()
5833 if (ext4_read_bh_lock(journal->j_sb_buffer, REQ_META | REQ_PRIO, true)) { in ext4_get_dev_journal()
5837 if (be32_to_cpu(journal->j_superblock->s_nr_users) != 1) { in ext4_get_dev_journal()
5840 be32_to_cpu(journal->j_superblock->s_nr_users)); in ext4_get_dev_journal()
5844 ext4_init_journal_params(sb, journal); in ext4_get_dev_journal()
5845 return journal; in ext4_get_dev_journal()
5848 jbd2_journal_destroy(journal); in ext4_get_dev_journal()
5858 journal_t *journal; in ext4_load_journal() local
5883 journal = ext4_get_journal(sb, journal_inum); in ext4_load_journal()
5884 if (!journal) in ext4_load_journal()
5887 journal = ext4_get_dev_journal(sb, journal_dev); in ext4_load_journal()
5888 if (!journal) in ext4_load_journal()
5892 journal_dev_ro = bdev_read_only(journal->j_dev); in ext4_load_journal()
5923 if (!(journal->j_flags & JBD2_BARRIER)) in ext4_load_journal()
5927 err = jbd2_journal_wipe(journal, !really_read_only); in ext4_load_journal()
5933 err = jbd2_journal_load(journal); in ext4_load_journal()
5945 EXT4_SB(sb)->s_journal = journal; in ext4_load_journal()
5949 jbd2_journal_destroy(journal); in ext4_load_journal()
5964 jbd2_journal_destroy(journal); in ext4_load_journal()
6102 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_mark_recovery_complete() local
6105 if (journal != NULL) { in ext4_mark_recovery_complete()
6112 jbd2_journal_lock_updates(journal); in ext4_mark_recovery_complete()
6113 err = jbd2_journal_flush(journal, 0); in ext4_mark_recovery_complete()
6129 jbd2_journal_unlock_updates(journal); in ext4_mark_recovery_complete()
6141 journal_t *journal; in ext4_clear_journal_err() local
6150 journal = EXT4_SB(sb)->s_journal; in ext4_clear_journal_err()
6157 j_errno = jbd2_journal_errno(journal); in ext4_clear_journal_err()
6170 jbd2_journal_clear_err(journal); in ext4_clear_journal_err()
6171 jbd2_journal_update_sb_errno(journal); in ext4_clear_journal_err()
6182 journal_t *journal; in ext4_force_commit() local
6187 journal = EXT4_SB(sb)->s_journal; in ext4_force_commit()
6188 return ext4_journal_force_commit(journal); in ext4_force_commit()
6247 journal_t *journal; in ext4_freeze() local
6252 journal = EXT4_SB(sb)->s_journal; in ext4_freeze()
6254 if (journal) { in ext4_freeze()
6256 jbd2_journal_lock_updates(journal); in ext4_freeze()
6262 error = jbd2_journal_flush(journal, 0); in ext4_freeze()
6274 if (journal) in ext4_freeze()
6276 jbd2_journal_unlock_updates(journal); in ext4_freeze()