ext4: remove the journal=update mount option
authorEric Sandeen <sandeen@redhat.com>
Mon, 20 Feb 2012 22:53:04 +0000 (17:53 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 Feb 2012 22:53:04 +0000 (17:53 -0500)
The V2 journal format was introduced around ten years ago,
for ext3. It seems highly unlikely that anyone will need this
migration option for ext4.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Documentation/filesystems/ext4.txt
fs/ext4/super.c
fs/jbd2/journal.c

index 10ec4639f1522dad34d66eea61443750435fe3ae..09d5f32ea156655950274a1cbecae9f1291f9b39 100644 (file)
@@ -144,9 +144,6 @@ journal_async_commit        Commit block can be written to disk without waiting
                        mount the device. This will enable 'journal_checksum'
                        internally.
 
-journal=update         Update the ext4 file system's journal to the current
-                       format.
-
 journal_dev=devnum     When the external journal device's major/minor numbers
                        have changed, this option allows the user to specify
                        the new journal location.  The journal device is
index 3e697ec7feca72f1e72b9ac8a384601557cba6d4..9420c50c5c6a37d045594eeb508c395d37068312 100644 (file)
@@ -1336,8 +1336,7 @@ enum {
        Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl,
        Opt_auto_da_alloc, Opt_noauto_da_alloc, Opt_noload, Opt_nobh, Opt_bh,
        Opt_commit, Opt_min_batch_time, Opt_max_batch_time,
-       Opt_journal_update, Opt_journal_dev,
-       Opt_journal_checksum, Opt_journal_async_commit,
+       Opt_journal_dev, Opt_journal_checksum, Opt_journal_async_commit,
        Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
        Opt_data_err_abort, Opt_data_err_ignore,
        Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
@@ -1379,7 +1378,6 @@ static const match_table_t tokens = {
        {Opt_commit, "commit=%u"},
        {Opt_min_batch_time, "min_batch_time=%u"},
        {Opt_max_batch_time, "max_batch_time=%u"},
-       {Opt_journal_update, "journal=update"},
        {Opt_journal_dev, "journal_dev=%u"},
        {Opt_journal_checksum, "journal_checksum"},
        {Opt_journal_async_commit, "journal_async_commit"},
@@ -1629,19 +1627,6 @@ static int parse_options(char *options, struct super_block *sb,
                        ext4_msg(sb, KERN_ERR, "(no)acl options not supported");
                        break;
 #endif
-               case Opt_journal_update:
-                       /* @@@ FIXME */
-                       /* Eventually we will want to be able to create
-                          a journal file here.  For now, only allow the
-                          user to specify an existing inode to be the
-                          journal file. */
-                       if (is_remount) {
-                               ext4_msg(sb, KERN_ERR,
-                                        "Cannot specify journal on remount");
-                               return 0;
-                       }
-                       set_opt(sb, UPDATE_JOURNAL);
-                       break;
                case Opt_journal_dev:
                        if (is_remount) {
                                ext4_msg(sb, KERN_ERR,
@@ -4109,15 +4094,6 @@ static int ext4_load_journal(struct super_block *sb,
        if (!(journal->j_flags & JBD2_BARRIER))
                ext4_msg(sb, KERN_INFO, "barriers disabled");
 
-       if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) {
-               err = jbd2_journal_update_format(journal);
-               if (err)  {
-                       ext4_msg(sb, KERN_ERR, "error updating journal");
-                       jbd2_journal_destroy(journal);
-                       return err;
-               }
-       }
-
        if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER))
                err = jbd2_journal_wipe(journal, !really_read_only);
        if (!err) {
index 47e341100c2c9288c8f8d06e0a8240b9772894c3..cfb36d99f7a4f61de69a3aea1c539791c9383255 100644 (file)
@@ -71,7 +71,6 @@ EXPORT_SYMBOL(jbd2_journal_revoke);
 
 EXPORT_SYMBOL(jbd2_journal_init_dev);
 EXPORT_SYMBOL(jbd2_journal_init_inode);
-EXPORT_SYMBOL(jbd2_journal_update_format);
 EXPORT_SYMBOL(jbd2_journal_check_used_features);
 EXPORT_SYMBOL(jbd2_journal_check_available_features);
 EXPORT_SYMBOL(jbd2_journal_set_features);
@@ -96,7 +95,6 @@ EXPORT_SYMBOL(jbd2_journal_release_jbd_inode);
 EXPORT_SYMBOL(jbd2_journal_begin_ordered_truncate);
 EXPORT_SYMBOL(jbd2_inode_cache);
 
-static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *);
 static void __journal_abort_soft (journal_t *journal, int errno);
 static int jbd2_journal_create_slab(size_t slab_size);
 
@@ -1551,61 +1549,6 @@ void jbd2_journal_clear_features(journal_t *journal, unsigned long compat,
 }
 EXPORT_SYMBOL(jbd2_journal_clear_features);
 
-/**
- * int jbd2_journal_update_format () - Update on-disk journal structure.
- * @journal: Journal to act on.
- *
- * Given an initialised but unloaded journal struct, poke about in the
- * on-disk structure to update it to the most recent supported version.
- */
-int jbd2_journal_update_format (journal_t *journal)
-{
-       journal_superblock_t *sb;
-       int err;
-
-       err = journal_get_superblock(journal);
-       if (err)
-               return err;
-
-       sb = journal->j_superblock;
-
-       switch (be32_to_cpu(sb->s_header.h_blocktype)) {
-       case JBD2_SUPERBLOCK_V2:
-               return 0;
-       case JBD2_SUPERBLOCK_V1:
-               return journal_convert_superblock_v1(journal, sb);
-       default:
-               break;
-       }
-       return -EINVAL;
-}
-
-static int journal_convert_superblock_v1(journal_t *journal,
-                                        journal_superblock_t *sb)
-{
-       int offset, blocksize;
-       struct buffer_head *bh;
-
-       printk(KERN_WARNING
-               "JBD2: Converting superblock from version 1 to 2.\n");
-
-       /* Pre-initialise new fields to zero */
-       offset = ((char *) &(sb->s_feature_compat)) - ((char *) sb);
-       blocksize = be32_to_cpu(sb->s_blocksize);
-       memset(&sb->s_feature_compat, 0, blocksize-offset);
-
-       sb->s_nr_users = cpu_to_be32(1);
-       sb->s_header.h_blocktype = cpu_to_be32(JBD2_SUPERBLOCK_V2);
-       journal->j_format_version = 2;
-
-       bh = journal->j_sb_buffer;
-       BUFFER_TRACE(bh, "marking dirty");
-       mark_buffer_dirty(bh);
-       sync_dirty_buffer(bh);
-       return 0;
-}
-
-
 /**
  * int jbd2_journal_flush () - Flush journal
  * @journal: Journal to act on.