From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/5] ext3: remove ->write_super and stop maintaining ->s_dirt
Date: Mon, 27 Apr 2009 09:46:42 -0400 [thread overview]
Message-ID: <20090427134815.576590000@bombadil.infradead.org> (raw)
In-Reply-To: 20090427134640.128837000@bombadil.infradead.org
[-- Attachment #1: ext3-remove-write_super --]
[-- Type: text/plain, Size: 6123 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/ext3/balloc.c
===================================================================
--- linux-2.6.orig/fs/ext3/balloc.c 2009-04-26 20:15:22.659103761 +0200
+++ linux-2.6/fs/ext3/balloc.c 2009-04-26 20:15:28.904948812 +0200
@@ -649,7 +649,7 @@ do_more:
count = overflow;
goto do_more;
}
- sb->s_dirt = 1;
+
error_return:
brelse(bitmap_bh);
ext3_std_error(sb, err);
@@ -1708,7 +1708,6 @@ allocated:
if (!fatal)
fatal = err;
- sb->s_dirt = 1;
if (fatal)
goto out;
Index: linux-2.6/fs/ext3/ialloc.c
===================================================================
--- linux-2.6.orig/fs/ext3/ialloc.c 2009-04-26 20:15:31.497949796 +0200
+++ linux-2.6/fs/ext3/ialloc.c 2009-04-26 20:15:36.303949623 +0200
@@ -181,7 +181,7 @@ void ext3_free_inode (handle_t *handle,
err = ext3_journal_dirty_metadata(handle, bitmap_bh);
if (!fatal)
fatal = err;
- sb->s_dirt = 1;
+
error_return:
brelse(bitmap_bh);
ext3_std_error(sb, fatal);
@@ -537,7 +537,6 @@ got:
percpu_counter_dec(&sbi->s_freeinodes_counter);
if (S_ISDIR(mode))
percpu_counter_inc(&sbi->s_dirs_counter);
- sb->s_dirt = 1;
inode->i_uid = current_fsuid();
if (test_opt (sb, GRPID))
Index: linux-2.6/fs/ext3/inode.c
===================================================================
--- linux-2.6.orig/fs/ext3/inode.c 2009-04-26 20:15:39.101074778 +0200
+++ linux-2.6/fs/ext3/inode.c 2009-04-26 20:15:41.178074904 +0200
@@ -2960,7 +2960,6 @@ static int ext3_do_update_inode(handle_t
ext3_update_dynamic_rev(sb);
EXT3_SET_RO_COMPAT_FEATURE(sb,
EXT3_FEATURE_RO_COMPAT_LARGE_FILE);
- sb->s_dirt = 1;
handle->h_sync = 1;
err = ext3_journal_dirty_metadata(handle,
EXT3_SB(sb)->s_sbh);
Index: linux-2.6/fs/ext3/resize.c
===================================================================
--- linux-2.6.orig/fs/ext3/resize.c 2009-04-26 20:15:44.601075139 +0200
+++ linux-2.6/fs/ext3/resize.c 2009-04-26 20:15:50.336949513 +0200
@@ -934,7 +934,6 @@ int ext3_group_add(struct super_block *s
EXT3_INODES_PER_GROUP(sb));
ext3_journal_dirty_metadata(handle, sbi->s_sbh);
- sb->s_dirt = 1;
exit_journal:
unlock_super(sb);
@@ -1066,7 +1065,6 @@ int ext3_group_extend(struct super_block
}
es->s_blocks_count = cpu_to_le32(o_blocks_count + add);
ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
- sb->s_dirt = 1;
unlock_super(sb);
ext3_debug("freeing blocks %lu through "E3FSBLK"\n", o_blocks_count,
o_blocks_count + add);
Index: linux-2.6/fs/ext3/super.c
===================================================================
--- linux-2.6.orig/fs/ext3/super.c 2009-04-26 20:14:35.602949501 +0200
+++ linux-2.6/fs/ext3/super.c 2009-04-26 20:15:12.931075180 +0200
@@ -67,7 +67,6 @@ static const char *ext3_decode_error(str
static int ext3_remount (struct super_block * sb, int * flags, char * data);
static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf);
static int ext3_unfreeze(struct super_block *sb);
-static void ext3_write_super (struct super_block * sb);
static int ext3_freeze(struct super_block *sb);
/*
@@ -761,7 +760,6 @@ static const struct super_operations ext
.dirty_inode = ext3_dirty_inode,
.delete_inode = ext3_delete_inode,
.put_super = ext3_put_super,
- .write_super = ext3_write_super,
.sync_fs = ext3_sync_fs,
.freeze_fs = ext3_freeze,
.unfreeze_fs = ext3_unfreeze,
@@ -1785,7 +1783,6 @@ static int ext3_fill_super (struct super
#else
es->s_flags |= cpu_to_le32(EXT2_FLAGS_SIGNED_HASH);
#endif
- sb->s_dirt = 1;
}
if (sbi->s_blocks_per_group > blocksize * 8) {
@@ -2264,7 +2261,6 @@ static int ext3_load_journal(struct supe
if (journal_devnum &&
journal_devnum != le32_to_cpu(es->s_journal_dev)) {
es->s_journal_dev = cpu_to_le32(journal_devnum);
- sb->s_dirt = 1;
/* Make sure we flush the recovery flag to disk. */
ext3_commit_super(sb, es, 1);
@@ -2307,7 +2303,6 @@ static int ext3_create_journal(struct su
EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL);
es->s_journal_inum = cpu_to_le32(journal_inum);
- sb->s_dirt = 1;
/* Make sure we flush the recovery flag to disk. */
ext3_commit_super(sb, es, 1);
@@ -2353,7 +2348,6 @@ static void ext3_mark_recovery_complete(
if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER) &&
sb->s_flags & MS_RDONLY) {
EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER);
- sb->s_dirt = 0;
ext3_commit_super(sb, es, 1);
}
unlock_super(sb);
@@ -2412,29 +2406,14 @@ int ext3_force_commit(struct super_block
return 0;
journal = EXT3_SB(sb)->s_journal;
- sb->s_dirt = 0;
ret = ext3_journal_force_commit(journal);
return ret;
}
-/*
- * Ext3 always journals updates to the superblock itself, so we don't
- * have to propagate any other updates to the superblock on disk at this
- * point. (We can probably nuke this function altogether, and remove
- * any mention to sb->s_dirt in all of fs/ext3; eventual cleanup...)
- */
-static void ext3_write_super (struct super_block * sb)
-{
- if (mutex_trylock(&sb->s_lock) != 0)
- BUG();
- sb->s_dirt = 0;
-}
-
static int ext3_sync_fs(struct super_block *sb, int wait)
{
tid_t target;
- sb->s_dirt = 0;
if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) {
if (wait)
log_wait_commit(EXT3_SB(sb)->s_journal, target);
@@ -2450,7 +2429,6 @@ static int ext3_freeze(struct super_bloc
{
int error = 0;
journal_t *journal;
- sb->s_dirt = 0;
if (!(sb->s_flags & MS_RDONLY)) {
journal = EXT3_SB(sb)->s_journal;
Index: linux-2.6/fs/ext3/xattr.c
===================================================================
--- linux-2.6.orig/fs/ext3/xattr.c 2009-04-26 20:15:55.757949096 +0200
+++ linux-2.6/fs/ext3/xattr.c 2009-04-26 20:15:58.356074759 +0200
@@ -463,7 +463,6 @@ static void ext3_xattr_update_super_bloc
if (ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh) == 0) {
EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_EXT_ATTR);
- sb->s_dirt = 1;
ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
}
}
next prev parent reply other threads:[~2009-04-27 13:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 13:46 [PATCH 0/5] remove superflous ->write_super instances Christoph Hellwig
2009-04-27 13:46 ` [PATCH 1/5] btrfs: remove ->write_super and stop maintaining ->s_dirt Christoph Hellwig
2009-04-27 13:46 ` Christoph Hellwig [this message]
2009-04-27 13:46 ` [PATCH 3/5] gfs2: " Christoph Hellwig
2009-04-27 15:49 ` Steven Whitehouse
2009-04-27 13:46 ` [PATCH 4/5] ocfs2: " Christoph Hellwig
2009-04-28 16:45 ` Joel Becker
2009-04-27 13:46 ` [PATCH 5/5] qnx4: remove ->write_super Christoph Hellwig
2009-04-27 14:32 ` [PATCH 0/5] remove superflous ->write_super instances Theodore Tso
2009-04-27 14:36 ` Christoph Hellwig
2009-04-27 16:54 ` Theodore Tso
2009-04-27 14:55 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090427134815.576590000@bombadil.infradead.org \
--to=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).