jbd2: drop JBD2_ABORT_ON_SYNCDATA_ERR
authorBaokun Li <libaokun1@huawei.com>
Wed, 22 Jan 2025 11:05:30 +0000 (19:05 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 13 Mar 2025 14:08:09 +0000 (10:08 -0400)
Since ext4's data_err=abort mode doesn't depend on
JBD2_ABORT_ON_SYNCDATA_ERR anymore, and nobody else uses it, we can
drop it and only warn in jbd2 as it used to be long ago.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250122110533.4116662-7-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c
fs/jbd2/commit.c
include/linux/jbd2.h

index 6db7cce48ea0d7cc52a84d2aaf92367a077acdf6..53173950c22989419edb1ffe605a1a7907ba24e8 100644 (file)
@@ -5770,10 +5770,6 @@ static void ext4_init_journal_params(struct super_block *sb, journal_t *journal)
                journal->j_flags |= JBD2_BARRIER;
        else
                journal->j_flags &= ~JBD2_BARRIER;
-       if (test_opt(sb, DATA_ERR_ABORT))
-               journal->j_flags |= JBD2_ABORT_ON_SYNCDATA_ERR;
-       else
-               journal->j_flags &= ~JBD2_ABORT_ON_SYNCDATA_ERR;
        /*
         * Always enable journal cycle record option, letting the journal
         * records log transactions continuously between each mount.
index e8e80761ac730a0a44db2a679f92969433b5435a..b7a76ec1463d83d081f9993de54f9314e7aeab71 100644 (file)
@@ -738,10 +738,8 @@ start_journal_io:
        err = journal_finish_inode_data_buffers(journal, commit_transaction);
        if (err) {
                printk(KERN_WARNING
-                       "JBD2: Detected IO errors while flushing file data "
-                      "on %s\n", journal->j_devname);
-               if (journal->j_flags & JBD2_ABORT_ON_SYNCDATA_ERR)
-                       jbd2_journal_abort(journal, err);
+                       "JBD2: Detected IO errors %d while flushing file data on %s\n",
+                       err, journal->j_devname);
                err = 0;
        }
 
index 82ef232935c0711241976349beccf71d43686cbc..cdb64805318438f83db576dfa66a448fc80e6e6d 100644 (file)
@@ -1382,9 +1382,6 @@ JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit,  FAST_COMMIT)
 #define JBD2_FLUSHED   0x008   /* The journal superblock has been flushed */
 #define JBD2_LOADED    0x010   /* The journal superblock has been loaded */
 #define JBD2_BARRIER   0x020   /* Use IDE barriers */
-#define JBD2_ABORT_ON_SYNCDATA_ERR     0x040   /* Abort the journal on file
-                                                * data write error in ordered
-                                                * mode */
 #define JBD2_CYCLE_RECORD              0x080   /* Journal cycled record log on
                                                 * clean and empty filesystem
                                                 * logging area */