aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2012-02-20 17:53:04 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-02-20 17:53:04 -0500
commit43e625d84fa7daca0ad46f1dbc965b04fd204afe (patch)
tree5a42f4efec45c59edb2967b439135a5a603d9525
parent1592d2c5574edadb0871cc4ac84265bdd18b2d68 (diff)
ext4: remove the journal=update mount option
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>
-rw-r--r--Documentation/filesystems/ext4.txt3
-rw-r--r--fs/ext4/super.c26
-rw-r--r--fs/jbd2/journal.c57
3 files changed, 1 insertions, 85 deletions
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 10ec4639f15..09d5f32ea15 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -144,9 +144,6 @@ journal_async_commit Commit block can be written to disk without waiting
144 mount the device. This will enable 'journal_checksum' 144 mount the device. This will enable 'journal_checksum'
145 internally. 145 internally.
146 146
147journal=update Update the ext4 file system's journal to the current
148 format.
149
150journal_dev=devnum When the external journal device's major/minor numbers 147journal_dev=devnum When the external journal device's major/minor numbers
151 have changed, this option allows the user to specify 148 have changed, this option allows the user to specify
152 the new journal location. The journal device is 149 the new journal location. The journal device is
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3e697ec7fec..9420c50c5c6 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1336,8 +1336,7 @@ enum {
1336 Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, 1336 Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl,
1337 Opt_auto_da_alloc, Opt_noauto_da_alloc, Opt_noload, Opt_nobh, Opt_bh, 1337 Opt_auto_da_alloc, Opt_noauto_da_alloc, Opt_noload, Opt_nobh, Opt_bh,
1338 Opt_commit, Opt_min_batch_time, Opt_max_batch_time, 1338 Opt_commit, Opt_min_batch_time, Opt_max_batch_time,
1339 Opt_journal_update, Opt_journal_dev, 1339 Opt_journal_dev, Opt_journal_checksum, Opt_journal_async_commit,
1340 Opt_journal_checksum, Opt_journal_async_commit,
1341 Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, 1340 Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
1342 Opt_data_err_abort, Opt_data_err_ignore, 1341 Opt_data_err_abort, Opt_data_err_ignore,
1343 Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, 1342 Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
@@ -1379,7 +1378,6 @@ static const match_table_t tokens = {
1379 {Opt_commit, "commit=%u"}, 1378 {Opt_commit, "commit=%u"},
1380 {Opt_min_batch_time, "min_batch_time=%u"}, 1379 {Opt_min_batch_time, "min_batch_time=%u"},
1381 {Opt_max_batch_time, "max_batch_time=%u"}, 1380 {Opt_max_batch_time, "max_batch_time=%u"},
1382 {Opt_journal_update, "journal=update"},
1383 {Opt_journal_dev, "journal_dev=%u"}, 1381 {Opt_journal_dev, "journal_dev=%u"},
1384 {Opt_journal_checksum, "journal_checksum"}, 1382 {Opt_journal_checksum, "journal_checksum"},
1385 {Opt_journal_async_commit, "journal_async_commit"}, 1383 {Opt_journal_async_commit, "journal_async_commit"},
@@ -1629,19 +1627,6 @@ static int parse_options(char *options, struct super_block *sb,
1629 ext4_msg(sb, KERN_ERR, "(no)acl options not supported"); 1627 ext4_msg(sb, KERN_ERR, "(no)acl options not supported");
1630 break; 1628 break;
1631#endif 1629#endif
1632 case Opt_journal_update:
1633 /* @@@ FIXME */
1634 /* Eventually we will want to be able to create
1635 a journal file here. For now, only allow the
1636 user to specify an existing inode to be the
1637 journal file. */
1638 if (is_remount) {
1639 ext4_msg(sb, KERN_ERR,
1640 "Cannot specify journal on remount");
1641 return 0;
1642 }
1643 set_opt(sb, UPDATE_JOURNAL);
1644 break;
1645 case Opt_journal_dev: 1630 case Opt_journal_dev:
1646 if (is_remount) { 1631 if (is_remount) {
1647 ext4_msg(sb, KERN_ERR, 1632 ext4_msg(sb, KERN_ERR,
@@ -4109,15 +4094,6 @@ static int ext4_load_journal(struct super_block *sb,
4109 if (!(journal->j_flags & JBD2_BARRIER)) 4094 if (!(journal->j_flags & JBD2_BARRIER))
4110 ext4_msg(sb, KERN_INFO, "barriers disabled"); 4095 ext4_msg(sb, KERN_INFO, "barriers disabled");
4111 4096
4112 if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) {
4113 err = jbd2_journal_update_format(journal);
4114 if (err) {
4115 ext4_msg(sb, KERN_ERR, "error updating journal");
4116 jbd2_journal_destroy(journal);
4117 return err;
4118 }
4119 }
4120
4121 if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER)) 4097 if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER))
4122 err = jbd2_journal_wipe(journal, !really_read_only); 4098 err = jbd2_journal_wipe(journal, !really_read_only);
4123 if (!err) { 4099 if (!err) {
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 47e341100c2..cfb36d99f7a 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -71,7 +71,6 @@ EXPORT_SYMBOL(jbd2_journal_revoke);
71 71
72EXPORT_SYMBOL(jbd2_journal_init_dev); 72EXPORT_SYMBOL(jbd2_journal_init_dev);
73EXPORT_SYMBOL(jbd2_journal_init_inode); 73EXPORT_SYMBOL(jbd2_journal_init_inode);
74EXPORT_SYMBOL(jbd2_journal_update_format);
75EXPORT_SYMBOL(jbd2_journal_check_used_features); 74EXPORT_SYMBOL(jbd2_journal_check_used_features);
76EXPORT_SYMBOL(jbd2_journal_check_available_features); 75EXPORT_SYMBOL(jbd2_journal_check_available_features);
77EXPORT_SYMBOL(jbd2_journal_set_features); 76EXPORT_SYMBOL(jbd2_journal_set_features);
@@ -96,7 +95,6 @@ EXPORT_SYMBOL(jbd2_journal_release_jbd_inode);
96EXPORT_SYMBOL(jbd2_journal_begin_ordered_truncate); 95EXPORT_SYMBOL(jbd2_journal_begin_ordered_truncate);
97EXPORT_SYMBOL(jbd2_inode_cache); 96EXPORT_SYMBOL(jbd2_inode_cache);
98 97
99static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *);
100static void __journal_abort_soft (journal_t *journal, int errno); 98static void __journal_abort_soft (journal_t *journal, int errno);
101static int jbd2_journal_create_slab(size_t slab_size); 99static int jbd2_journal_create_slab(size_t slab_size);
102 100
@@ -1552,61 +1550,6 @@ void jbd2_journal_clear_features(journal_t *journal, unsigned long compat,
1552EXPORT_SYMBOL(jbd2_journal_clear_features); 1550EXPORT_SYMBOL(jbd2_journal_clear_features);
1553 1551
1554/** 1552/**
1555 * int jbd2_journal_update_format () - Update on-disk journal structure.
1556 * @journal: Journal to act on.
1557 *
1558 * Given an initialised but unloaded journal struct, poke about in the
1559 * on-disk structure to update it to the most recent supported version.
1560 */
1561int jbd2_journal_update_format (journal_t *journal)
1562{
1563 journal_superblock_t *sb;
1564 int err;
1565
1566 err = journal_get_superblock(journal);
1567 if (err)
1568 return err;
1569
1570 sb = journal->j_superblock;
1571
1572 switch (be32_to_cpu(sb->s_header.h_blocktype)) {
1573 case JBD2_SUPERBLOCK_V2:
1574 return 0;
1575 case JBD2_SUPERBLOCK_V1:
1576 return journal_convert_superblock_v1(journal, sb);
1577 default:
1578 break;
1579 }
1580 return -EINVAL;
1581}
1582
1583static int journal_convert_superblock_v1(journal_t *journal,
1584 journal_superblock_t *sb)
1585{
1586 int offset, blocksize;
1587 struct buffer_head *bh;
1588
1589 printk(KERN_WARNING
1590 "JBD2: Converting superblock from version 1 to 2.\n");
1591
1592 /* Pre-initialise new fields to zero */
1593 offset = ((char *) &(sb->s_feature_compat)) - ((char *) sb);
1594 blocksize = be32_to_cpu(sb->s_blocksize);
1595 memset(&sb->s_feature_compat, 0, blocksize-offset);
1596
1597 sb->s_nr_users = cpu_to_be32(1);
1598 sb->s_header.h_blocktype = cpu_to_be32(JBD2_SUPERBLOCK_V2);
1599 journal->j_format_version = 2;
1600
1601 bh = journal->j_sb_buffer;
1602 BUFFER_TRACE(bh, "marking dirty");
1603 mark_buffer_dirty(bh);
1604 sync_dirty_buffer(bh);
1605 return 0;
1606}
1607
1608
1609/**
1610 * int jbd2_journal_flush () - Flush journal 1553 * int jbd2_journal_flush () - Flush journal
1611 * @journal: Journal to act on. 1554 * @journal: Journal to act on.
1612 * 1555 *