Lines Matching refs:journal
476 journal_t *journal = sbi->s_journal;
483 !(sb->s_flags & SB_ACTIVE) || !journal ||
484 journal->j_flags & JBD2_UNMOUNT)
509 static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn)
511 struct super_block *sb = journal->j_private;
676 * writing it out straight away; and given that the journal is about to
681 * the journal instead. On recovery, the journal will complain about
687 * used to deal with unrecoverable failures such as journal IO errors or ENOMEM
694 journal_t *journal = EXT4_SB(sb)->s_journal;
701 if (!continue_fs && !ext4_emergency_ro(sb) && journal)
702 jbd2_journal_abort(journal, -error);
708 * superblock through the journal. Due to lock ordering
711 * careful when the journal is already shutting down. If we get
715 if (continue_fs && journal &&
749 journal_t *journal = sbi->s_journal;
753 * If the journal is still running, we have to write out superblock
754 * through the journal to avoid collisions of other journalled sb
761 !sb_rdonly(sbi->s_sb) && journal) {
765 handle = jbd2_journal_start(journal, 1);
797 * Write through journal failed. Write sb directly to get error info
1089 * journal has been aborted. We return 1 as a hint to callers
1288 * Unregister sysfs before destroying jbd2 journal.
1313 ext4_abort(sb, -err, "Couldn't clean up the journal");
1356 * Invalidate the journal device's buffers. We don't want them
1357 * floating about in memory - the physical journal device may
1701 {"journal", EXT4_MOUNT_JOURNAL_DATA},
1829 fsparam_u32 ("journal", Opt_removed), /* mount option from ext2/3 */
2300 "Cannot specify journal on remount");
2314 "Cannot specify journal on remount");
2321 "journal device path");
2333 ext4_msg(NULL, KERN_ERR, "Invalid journal IO priority"
2779 "Remounting file system with no journal "
2794 "Remounting fs w/o journal so ignoring data_err option");
2801 "both data=journal and dax");
3007 SEQ_OPTS_PUTS("data=journal");
4088 /* journal checksum v3 */
4092 /* journal checksum v1 */
4236 * Add the internal journal blocks whether the journal has been
4242 /* j_inum for internal journal is non-zero */
4249 ext4_msg(sb, KERN_ERR, "can't get journal size");
4934 ext4_msg(sb, KERN_ERR, "Failed to set 64-bit journal feature");
4939 ext4_msg(sb, KERN_ERR, "Failed to set journal checksum "
4948 "Failed to set fast commit journal feature");
4952 /* We have now updated the journal if required, so we can
4956 /* No mode set, assume a default based on the journal
4957 * capabilities: ORDERED_DATA if the journal can
5008 "data=journal disables delayed allocation, "
5010 /* can't mount with both data=journal and dioread_nolock. */
5015 "both data=journal and delalloc");
5020 "both data=journal and dax");
5471 * The first inode we look at is the journal inode. Don't try
5472 * root first: it may be modified in the journal!
5482 ext4_msg(sb, KERN_ERR, "required journal recovery "
5488 /* Nojournal mode, all journal mount options are illegal */
5492 "can't mount with %s, fs mounted w/o journal",
5629 * We can only set up the journal commit callback once
5803 descr = "out journal";
5827 * Setup any per-fs journal parameters now. We'll do this both on
5828 * initial mount, once the journal has been initialised but before we've
5831 static void ext4_init_journal_params(struct super_block *sb, journal_t *journal)
5835 journal->j_commit_interval = sbi->s_commit_interval;
5836 journal->j_min_batch_time = sbi->s_min_batch_time;
5837 journal->j_max_batch_time = sbi->s_max_batch_time;
5838 ext4_fc_init(sb, journal);
5840 write_lock(&journal->j_state_lock);
5842 journal->j_flags |= JBD2_BARRIER;
5844 journal->j_flags &= ~JBD2_BARRIER;
5846 * Always enable journal cycle record option, letting the journal
5849 journal->j_flags |= JBD2_CYCLE_RECORD;
5850 write_unlock(&journal->j_state_lock);
5865 ext4_msg(sb, KERN_ERR, "no journal found");
5871 ext4_msg(sb, KERN_ERR, "journal inode is deleted");
5875 ext4_msg(sb, KERN_ERR, "invalid journal inode");
5885 static int ext4_journal_bmap(journal_t *journal, sector_t *block)
5890 if (journal->j_inode == NULL)
5895 ret = ext4_map_blocks(NULL, journal->j_inode, &map, 0);
5897 ext4_msg(journal->j_inode->i_sb, KERN_CRIT,
5898 "journal bmap failed: block %llu ret %d\n",
5900 jbd2_journal_abort(journal, ret ? ret : -EFSCORRUPTED);
5911 journal_t *journal;
5917 journal = jbd2_journal_init_inode(journal_inode);
5918 if (IS_ERR(journal)) {
5919 ext4_msg(sb, KERN_ERR, "Could not load journal inode");
5921 return ERR_CAST(journal);
5923 journal->j_private = sb;
5924 journal->j_bmap = ext4_journal_bmap;
5925 ext4_init_journal_params(sb, journal);
5926 return journal;
5947 "failed to open journal device unknown-block(%u,%u) %ld",
5957 "blocksize too small for journal device");
5968 "external journal");
5977 ext4_msg(sb, KERN_ERR, "external journal has bad superblock");
5985 ext4_msg(sb, KERN_ERR, "external journal has corrupt superblock");
5991 ext4_msg(sb, KERN_ERR, "journal UUID does not match");
6011 journal_t *journal;
6021 journal = jbd2_journal_init_dev(file_bdev(bdev_file), sb->s_bdev, j_start,
6023 if (IS_ERR(journal)) {
6024 ext4_msg(sb, KERN_ERR, "failed to create device journal");
6025 errno = PTR_ERR(journal);
6028 if (be32_to_cpu(journal->j_superblock->s_nr_users) != 1) {
6029 ext4_msg(sb, KERN_ERR, "External journal has more than one "
6031 be32_to_cpu(journal->j_superblock->s_nr_users));
6035 journal->j_private = sb;
6037 ext4_init_journal_params(sb, journal);
6038 return journal;
6041 ext4_journal_destroy(EXT4_SB(sb), journal);
6051 journal_t *journal;
6063 ext4_msg(sb, KERN_INFO, "external journal device major/minor "
6071 "filesystem has both journal inode and journal device!");
6076 journal = ext4_open_inode_journal(sb, journal_inum);
6077 if (IS_ERR(journal))
6078 return PTR_ERR(journal);
6080 journal = ext4_open_dev_journal(sb, journal_dev);
6081 if (IS_ERR(journal))
6082 return PTR_ERR(journal);
6085 journal_dev_ro = bdev_read_only(journal->j_dev);
6090 "journal device read-only, try mounting with '-o ro'");
6096 * Are we loading a blank journal or performing recovery after a
6116 if (!(journal->j_flags & JBD2_BARRIER))
6120 err = jbd2_journal_wipe(journal, !really_read_only);
6129 err = jbd2_journal_load(journal);
6151 ext4_msg(sb, KERN_ERR, "error loading journal");
6155 EXT4_SB(sb)->s_journal = journal;
6158 ext4_journal_destroy(EXT4_SB(sb), journal);
6176 ext4_journal_destroy(EXT4_SB(sb), journal);
6192 * read/only but we need to replay the journal; at that point,
6312 journal_t *journal = EXT4_SB(sb)->s_journal;
6315 if (journal != NULL) {
6322 jbd2_journal_lock_updates(journal);
6323 err = jbd2_journal_flush(journal, 0);
6339 jbd2_journal_unlock_updates(journal);
6344 * If we are mounting (or read-write remounting) a filesystem whose journal
6351 journal_t *journal;
6360 journal = EXT4_SB(sb)->s_journal;
6364 * journal by a prior ext4_error() or ext4_abort()
6367 j_errno = jbd2_journal_errno(journal);
6382 jbd2_journal_clear_err(journal);
6383 jbd2_journal_update_sb_errno(journal);
6416 * Data writeback is possible w/o journal transaction, so barrier must
6445 * gives us a chance to flush the journal completely and mark the fs clean.
6454 journal_t *journal = EXT4_SB(sb)->s_journal;
6456 if (journal) {
6457 /* Now we set up the journal barrier. */
6458 jbd2_journal_lock_updates(journal);
6462 * flush the journal.
6464 error = jbd2_journal_flush(journal, 0);
6476 if (journal)
6478 jbd2_journal_unlock_updates(journal);
6598 "both data=journal and delalloc");
6604 "both data=journal and dioread_nolock");
6659 * to disable replay of the journal when we next remount