Set the needs_recover incompat feature when debugfs writes journal
transactions so that we actually replay the journal contents at the
next mount.
Likewise, clear it if we successfully recover the journal.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
trans->flags &= ~J_TRANS_OPEN;
trans->block++;
+ trans->fs->super->s_feature_incompat |= EXT3_FEATURE_INCOMPAT_RECOVER;
+ ext2fs_mark_super_dirty(trans->fs);
error:
if (cbh)
brelse(cbh);
err = ext2fs_run_ext3_journal(¤t_fs);
if (err)
com_err("journal_run", err, "while recovering journal");
+ else {
+ current_fs->super->s_feature_incompat &=
+ ~EXT3_FEATURE_INCOMPAT_RECOVER;
+ ext2fs_mark_super_dirty(current_fs);
+ }
}