blob: 0dad8bdb125385a0b6ede60b40b92e348525990b [file] [log] [blame]
Harshad Shirwadkar6866d7b2020-10-15 13:37:55 -07001// SPDX-License-Identifier: GPL-2.0
2
3/*
4 * fs/ext4/fast_commit.c
5 *
6 * Written by Harshad Shirwadkar <harshadshirwadkar@gmail.com>
7 *
8 * Ext4 fast commits routines.
9 */
10#include "ext4_jbd2.h"
11
12void ext4_fc_init(struct super_block *sb, journal_t *journal)
13{
14 if (!test_opt2(sb, JOURNAL_FAST_COMMIT))
15 return;
16 if (jbd2_fc_init(journal, EXT4_NUM_FC_BLKS)) {
17 pr_warn("Error while enabling fast commits, turning off.");
18 ext4_clear_feature_fast_commit(sb);
19 }
20}