* [PATCH 0/5] remove superflous ->write_super instances
@ 2009-04-27 13:46 Christoph Hellwig
2009-04-27 13:46 ` [PATCH 1/5] btrfs: remove ->write_super and stop maintaining ->s_dirt Christoph Hellwig
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Christoph Hellwig @ 2009-04-27 13:46 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
Remove empty write_super methods and unessecary s_dirt maintainance.
To be applied ontop of Jan's sync patches.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/5] btrfs: remove ->write_super and stop maintaining ->s_dirt
2009-04-27 13:46 [PATCH 0/5] remove superflous ->write_super instances Christoph Hellwig
@ 2009-04-27 13:46 ` Christoph Hellwig
2009-04-27 13:46 ` [PATCH 2/5] ext3: " Christoph Hellwig
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2009-04-27 13:46 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
[-- Attachment #1: btrfs-remove-write_super --]
[-- Type: text/plain, Size: 3205 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/btrfs/inode.c
===================================================================
--- linux-2.6.orig/fs/btrfs/inode.c 2009-04-26 20:13:46.753074547 +0200
+++ linux-2.6/fs/btrfs/inode.c 2009-04-26 20:13:56.233950575 +0200
@@ -2260,7 +2260,6 @@ err:
btrfs_update_inode(trans, root, dir);
btrfs_drop_nlink(inode);
ret = btrfs_update_inode(trans, root, inode);
- dir->i_sb->s_dirt = 1;
out:
return ret;
}
@@ -2744,7 +2743,6 @@ error:
pending_del_nr);
}
btrfs_free_path(path);
- inode->i_sb->s_dirt = 1;
return ret;
}
@@ -3681,7 +3679,6 @@ static int btrfs_mknod(struct inode *dir
init_special_inode(inode, inode->i_mode, rdev);
btrfs_update_inode(trans, root, inode);
}
- dir->i_sb->s_dirt = 1;
btrfs_update_inode_block_group(trans, inode);
btrfs_update_inode_block_group(trans, dir);
out_unlock:
@@ -3746,7 +3743,6 @@ static int btrfs_create(struct inode *di
inode->i_op = &btrfs_file_inode_operations;
BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
}
- dir->i_sb->s_dirt = 1;
btrfs_update_inode_block_group(trans, inode);
btrfs_update_inode_block_group(trans, dir);
out_unlock:
@@ -3793,7 +3789,6 @@ static int btrfs_link(struct dentry *old
if (err)
drop_inode = 1;
- dir->i_sb->s_dirt = 1;
btrfs_update_inode_block_group(trans, dir);
err = btrfs_update_inode(trans, root, inode);
@@ -3875,7 +3870,6 @@ static int btrfs_mkdir(struct inode *dir
d_instantiate(dentry, inode);
drop_on_err = 0;
- dir->i_sb->s_dirt = 1;
btrfs_update_inode_block_group(trans, inode);
btrfs_update_inode_block_group(trans, dir);
@@ -4915,7 +4909,6 @@ static int btrfs_symlink(struct inode *d
inode->i_op = &btrfs_file_inode_operations;
BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
}
- dir->i_sb->s_dirt = 1;
btrfs_update_inode_block_group(trans, inode);
btrfs_update_inode_block_group(trans, dir);
if (drop_inode)
Index: linux-2.6/fs/btrfs/super.c
===================================================================
--- linux-2.6.orig/fs/btrfs/super.c 2009-04-26 20:13:14.072949756 +0200
+++ linux-2.6/fs/btrfs/super.c 2009-04-26 20:13:36.733950315 +0200
@@ -381,7 +381,6 @@ int btrfs_sync_fs(struct super_block *sb
if (sb->s_flags & MS_RDONLY)
return 0;
- sb->s_dirt = 0;
if (!wait) {
filemap_flush(root->fs_info->btree_inode->i_mapping);
return 0;
@@ -392,7 +391,6 @@ int btrfs_sync_fs(struct super_block *sb
trans = btrfs_start_transaction(root, 1);
ret = btrfs_commit_transaction(trans, root);
- sb->s_dirt = 0;
return ret;
}
@@ -431,11 +429,6 @@ static int btrfs_show_options(struct seq
return 0;
}
-static void btrfs_write_super(struct super_block *sb)
-{
- sb->s_dirt = 0;
-}
-
static int btrfs_test_super(struct super_block *s, void *data)
{
struct btrfs_fs_devices *test_fs_devices = data;
@@ -669,7 +662,6 @@ static int btrfs_unfreeze(struct super_b
static struct super_operations btrfs_super_ops = {
.delete_inode = btrfs_delete_inode,
.put_super = btrfs_put_super,
- .write_super = btrfs_write_super,
.sync_fs = btrfs_sync_fs,
.show_options = btrfs_show_options,
.write_inode = btrfs_write_inode,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/5] ext3: remove ->write_super and stop maintaining ->s_dirt
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
2009-04-27 13:46 ` [PATCH 3/5] gfs2: " Christoph Hellwig
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2009-04-27 13:46 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
[-- 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);
}
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/5] gfs2: remove ->write_super and stop maintaining ->s_dirt
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 ` [PATCH 2/5] ext3: " Christoph Hellwig
@ 2009-04-27 13:46 ` Christoph Hellwig
2009-04-27 15:49 ` Steven Whitehouse
2009-04-27 13:46 ` [PATCH 4/5] ocfs2: " Christoph Hellwig
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2009-04-27 13:46 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
[-- Attachment #1: gfs2-remove-write_super --]
[-- Type: text/plain, Size: 1704 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/gfs2/log.c
===================================================================
--- linux-2.6.orig/fs/gfs2/log.c 2009-04-26 20:16:25.197978791 +0200
+++ linux-2.6/fs/gfs2/log.c 2009-04-26 20:16:33.128077096 +0200
@@ -764,7 +764,6 @@ void __gfs2_log_flush(struct gfs2_sbd *s
}
gfs2_log_unlock(sdp);
- sdp->sd_vfs->s_dirt = 0;
up_write(&sdp->sd_log_flush_lock);
kfree(ai);
@@ -823,7 +822,6 @@ void gfs2_log_commit(struct gfs2_sbd *sd
log_refund(sdp, tr);
buf_lo_incore_commit(sdp, tr);
- sdp->sd_vfs->s_dirt = 1;
up_read(&sdp->sd_log_flush_lock);
gfs2_log_lock(sdp);
Index: linux-2.6/fs/gfs2/ops_super.c
===================================================================
--- linux-2.6.orig/fs/gfs2/ops_super.c 2009-04-26 20:16:36.808074171 +0200
+++ linux-2.6/fs/gfs2/ops_super.c 2009-04-26 20:16:49.267951560 +0200
@@ -185,17 +185,6 @@ static void gfs2_put_super(struct super_
}
/**
- * gfs2_write_super
- * @sb: the superblock
- *
- */
-
-static void gfs2_write_super(struct super_block *sb)
-{
- sb->s_dirt = 0;
-}
-
-/**
* gfs2_sync_fs - sync the filesystem
* @sb: the superblock
*
@@ -204,7 +193,6 @@ static void gfs2_write_super(struct supe
static int gfs2_sync_fs(struct super_block *sb, int wait)
{
- sb->s_dirt = 0;
if (wait && sb->s_fs_info)
gfs2_log_flush(sb->s_fs_info, NULL);
return 0;
@@ -710,7 +698,6 @@ const struct super_operations gfs2_super
.write_inode = gfs2_write_inode,
.delete_inode = gfs2_delete_inode,
.put_super = gfs2_put_super,
- .write_super = gfs2_write_super,
.sync_fs = gfs2_sync_fs,
.freeze_fs = gfs2_freeze,
.unfreeze_fs = gfs2_unfreeze,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] ocfs2: remove ->write_super and stop maintaining ->s_dirt
2009-04-27 13:46 [PATCH 0/5] remove superflous ->write_super instances Christoph Hellwig
` (2 preceding siblings ...)
2009-04-27 13:46 ` [PATCH 3/5] gfs2: " Christoph Hellwig
@ 2009-04-27 13:46 ` Christoph Hellwig
2009-04-28 16:45 ` Joel Becker
2009-04-27 13:46 ` [PATCH 5/5] qnx4: remove ->write_super Christoph Hellwig
` (2 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2009-04-27 13:46 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
[-- Attachment #1: ocfs2-remove-write_super --]
[-- Type: text/plain, Size: 1482 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/ocfs2/super.c
===================================================================
--- linux-2.6.orig/fs/ocfs2/super.c 2009-04-26 20:17:12.088104363 +0200
+++ linux-2.6/fs/ocfs2/super.c 2009-04-26 20:17:22.988951278 +0200
@@ -126,7 +126,6 @@ static int ocfs2_get_sector(struct super
struct buffer_head **bh,
int block,
int sect_size);
-static void ocfs2_write_super(struct super_block *sb);
static struct inode *ocfs2_alloc_inode(struct super_block *sb);
static void ocfs2_destroy_inode(struct inode *inode);
static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend);
@@ -141,7 +140,6 @@ static const struct super_operations ocf
.clear_inode = ocfs2_clear_inode,
.delete_inode = ocfs2_delete_inode,
.sync_fs = ocfs2_sync_fs,
- .write_super = ocfs2_write_super,
.put_super = ocfs2_put_super,
.remount_fs = ocfs2_remount,
.show_options = ocfs2_show_options,
@@ -365,24 +363,12 @@ static struct file_operations ocfs2_osb_
.llseek = generic_file_llseek,
};
-/*
- * write_super and sync_fs ripped right out of ext3.
- */
-static void ocfs2_write_super(struct super_block *sb)
-{
- if (mutex_trylock(&sb->s_lock) != 0)
- BUG();
- sb->s_dirt = 0;
-}
-
static int ocfs2_sync_fs(struct super_block *sb, int wait)
{
int status;
tid_t target;
struct ocfs2_super *osb = OCFS2_SB(sb);
- sb->s_dirt = 0;
-
if (ocfs2_is_hard_readonly(osb))
return -EROFS;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 5/5] qnx4: remove ->write_super
2009-04-27 13:46 [PATCH 0/5] remove superflous ->write_super instances Christoph Hellwig
` (3 preceding siblings ...)
2009-04-27 13:46 ` [PATCH 4/5] ocfs2: " Christoph Hellwig
@ 2009-04-27 13:46 ` Christoph Hellwig
2009-04-27 14:32 ` [PATCH 0/5] remove superflous ->write_super instances Theodore Tso
2009-04-27 14:55 ` Jan Kara
6 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2009-04-27 13:46 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
[-- Attachment #1: qnx4-remove-write_super --]
[-- Type: text/plain, Size: 834 bytes --]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/qnx4/inode.c
===================================================================
--- linux-2.6.orig/fs/qnx4/inode.c 2009-04-26 20:18:17.453949315 +0200
+++ linux-2.6/fs/qnx4/inode.c 2009-04-26 20:18:32.763951562 +0200
@@ -70,14 +70,6 @@ static void qnx4_delete_inode(struct ino
unlock_kernel();
}
-static void qnx4_write_super(struct super_block *sb)
-{
- lock_kernel();
- QNX4DEBUG(("qnx4: write_super\n"));
- sb->s_dirt = 0;
- unlock_kernel();
-}
-
static int qnx4_write_inode(struct inode *inode, int unused)
{
struct qnx4_inode_entry *raw_inode;
@@ -138,7 +130,6 @@ static const struct super_operations qnx
#ifdef CONFIG_QNX4FS_RW
.write_inode = qnx4_write_inode,
.delete_inode = qnx4_delete_inode,
- .write_super = qnx4_write_super,
#endif
};
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] remove superflous ->write_super instances
2009-04-27 13:46 [PATCH 0/5] remove superflous ->write_super instances Christoph Hellwig
` (4 preceding siblings ...)
2009-04-27 13:46 ` [PATCH 5/5] qnx4: remove ->write_super Christoph Hellwig
@ 2009-04-27 14:32 ` Theodore Tso
2009-04-27 14:36 ` Christoph Hellwig
2009-04-27 14:55 ` Jan Kara
6 siblings, 1 reply; 12+ messages in thread
From: Theodore Tso @ 2009-04-27 14:32 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jan Kara, linux-fsdevel
On Mon, Apr 27, 2009 at 09:46:40AM -0400, Christoph Hellwig wrote:
> Remove empty write_super methods and unessecary s_dirt maintainance.
I noticed you didn't supply a patch for ext4, so I'm guessing you
figured it out, but there is an (outdated) comment saying we should do
this for ext4; however, given that we now support non-journalled
operation, we do need to keep write_super() for when we aren't using
the journal to write the superblock. I'll make a note to myself that
we need to update the comment in ext4/super.c.
- Ted
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] remove superflous ->write_super instances
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
0 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2009-04-27 14:36 UTC (permalink / raw)
To: Theodore Tso; +Cc: Christoph Hellwig, Jan Kara, linux-fsdevel
On Mon, Apr 27, 2009 at 10:32:21AM -0400, Theodore Tso wrote:
> On Mon, Apr 27, 2009 at 09:46:40AM -0400, Christoph Hellwig wrote:
> > Remove empty write_super methods and unessecary s_dirt maintainance.
>
> I noticed you didn't supply a patch for ext4, so I'm guessing you
> figured it out, but there is an (outdated) comment saying we should do
> this for ext4; however, given that we now support non-journalled
> operation, we do need to keep write_super() for when we aren't using
> the journal to write the superblock. I'll make a note to myself that
> we need to update the comment in ext4/super.c.
Exactly, ext4 needs it for non-journaled mode. It might make sense
to just give the two modes different super_operations so that the normal
journaled mode doesn't need a write_super at all.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] remove superflous ->write_super instances
2009-04-27 13:46 [PATCH 0/5] remove superflous ->write_super instances Christoph Hellwig
` (5 preceding siblings ...)
2009-04-27 14:32 ` [PATCH 0/5] remove superflous ->write_super instances Theodore Tso
@ 2009-04-27 14:55 ` Jan Kara
6 siblings, 0 replies; 12+ messages in thread
From: Jan Kara @ 2009-04-27 14:55 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel
On Mon 27-04-09 09:46:40, Christoph Hellwig wrote:
> Remove empty write_super methods and unessecary s_dirt maintainance.
>
> To be applied ontop of Jan's sync patches.
I've looked through the patches and they look fine.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/5] gfs2: remove ->write_super and stop maintaining ->s_dirt
2009-04-27 13:46 ` [PATCH 3/5] gfs2: " Christoph Hellwig
@ 2009-04-27 15:49 ` Steven Whitehouse
0 siblings, 0 replies; 12+ messages in thread
From: Steven Whitehouse @ 2009-04-27 15:49 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jan Kara, linux-fsdevel
Hi,
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Steve.
On Mon, 2009-04-27 at 09:46 -0400, Christoph Hellwig wrote:
> plain text document attachment (gfs2-remove-write_super)
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6/fs/gfs2/log.c
> ===================================================================
> --- linux-2.6.orig/fs/gfs2/log.c 2009-04-26 20:16:25.197978791 +0200
> +++ linux-2.6/fs/gfs2/log.c 2009-04-26 20:16:33.128077096 +0200
> @@ -764,7 +764,6 @@ void __gfs2_log_flush(struct gfs2_sbd *s
> }
> gfs2_log_unlock(sdp);
>
> - sdp->sd_vfs->s_dirt = 0;
> up_write(&sdp->sd_log_flush_lock);
>
> kfree(ai);
> @@ -823,7 +822,6 @@ void gfs2_log_commit(struct gfs2_sbd *sd
> log_refund(sdp, tr);
> buf_lo_incore_commit(sdp, tr);
>
> - sdp->sd_vfs->s_dirt = 1;
> up_read(&sdp->sd_log_flush_lock);
>
> gfs2_log_lock(sdp);
> Index: linux-2.6/fs/gfs2/ops_super.c
> ===================================================================
> --- linux-2.6.orig/fs/gfs2/ops_super.c 2009-04-26 20:16:36.808074171 +0200
> +++ linux-2.6/fs/gfs2/ops_super.c 2009-04-26 20:16:49.267951560 +0200
> @@ -185,17 +185,6 @@ static void gfs2_put_super(struct super_
> }
>
> /**
> - * gfs2_write_super
> - * @sb: the superblock
> - *
> - */
> -
> -static void gfs2_write_super(struct super_block *sb)
> -{
> - sb->s_dirt = 0;
> -}
> -
> -/**
> * gfs2_sync_fs - sync the filesystem
> * @sb: the superblock
> *
> @@ -204,7 +193,6 @@ static void gfs2_write_super(struct supe
>
> static int gfs2_sync_fs(struct super_block *sb, int wait)
> {
> - sb->s_dirt = 0;
> if (wait && sb->s_fs_info)
> gfs2_log_flush(sb->s_fs_info, NULL);
> return 0;
> @@ -710,7 +698,6 @@ const struct super_operations gfs2_super
> .write_inode = gfs2_write_inode,
> .delete_inode = gfs2_delete_inode,
> .put_super = gfs2_put_super,
> - .write_super = gfs2_write_super,
> .sync_fs = gfs2_sync_fs,
> .freeze_fs = gfs2_freeze,
> .unfreeze_fs = gfs2_unfreeze,
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] remove superflous ->write_super instances
2009-04-27 14:36 ` Christoph Hellwig
@ 2009-04-27 16:54 ` Theodore Tso
0 siblings, 0 replies; 12+ messages in thread
From: Theodore Tso @ 2009-04-27 16:54 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jan Kara, linux-fsdevel
On Mon, Apr 27, 2009 at 10:36:00AM -0400, Christoph Hellwig wrote:
> On Mon, Apr 27, 2009 at 10:32:21AM -0400, Theodore Tso wrote:
> > On Mon, Apr 27, 2009 at 09:46:40AM -0400, Christoph Hellwig wrote:
> > > Remove empty write_super methods and unessecary s_dirt maintainance.
> >
> > I noticed you didn't supply a patch for ext4, so I'm guessing you
> > figured it out, but there is an (outdated) comment saying we should do
> > this for ext4; however, given that we now support non-journalled
> > operation, we do need to keep write_super() for when we aren't using
> > the journal to write the superblock. I'll make a note to myself that
> > we need to update the comment in ext4/super.c.
>
> Exactly, ext4 needs it for non-journaled mode. It might make sense
> to just give the two modes different super_operations so that the normal
> journaled mode doesn't need a write_super at all.
>
True. We'll bloat the kernel text space a little by having a separate
super_operations but it will allow us to clean up the code; it's
probably a worthwhile tradeoff, since we it's not just
ext4_write_super(), but also ext4_freeze() and ext4_unfreeze().
- Ted
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/5] ocfs2: remove ->write_super and stop maintaining ->s_dirt
2009-04-27 13:46 ` [PATCH 4/5] ocfs2: " Christoph Hellwig
@ 2009-04-28 16:45 ` Joel Becker
0 siblings, 0 replies; 12+ messages in thread
From: Joel Becker @ 2009-04-28 16:45 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jan Kara, linux-fsdevel
On Mon, Apr 27, 2009 at 09:46:44AM -0400, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Joel Becker <joel.becker@oracle.com>
>
> Index: linux-2.6/fs/ocfs2/super.c
> ===================================================================
> --- linux-2.6.orig/fs/ocfs2/super.c 2009-04-26 20:17:12.088104363 +0200
> +++ linux-2.6/fs/ocfs2/super.c 2009-04-26 20:17:22.988951278 +0200
> @@ -126,7 +126,6 @@ static int ocfs2_get_sector(struct super
> struct buffer_head **bh,
> int block,
> int sect_size);
> -static void ocfs2_write_super(struct super_block *sb);
> static struct inode *ocfs2_alloc_inode(struct super_block *sb);
> static void ocfs2_destroy_inode(struct inode *inode);
> static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend);
> @@ -141,7 +140,6 @@ static const struct super_operations ocf
> .clear_inode = ocfs2_clear_inode,
> .delete_inode = ocfs2_delete_inode,
> .sync_fs = ocfs2_sync_fs,
> - .write_super = ocfs2_write_super,
> .put_super = ocfs2_put_super,
> .remount_fs = ocfs2_remount,
> .show_options = ocfs2_show_options,
> @@ -365,24 +363,12 @@ static struct file_operations ocfs2_osb_
> .llseek = generic_file_llseek,
> };
>
> -/*
> - * write_super and sync_fs ripped right out of ext3.
> - */
> -static void ocfs2_write_super(struct super_block *sb)
> -{
> - if (mutex_trylock(&sb->s_lock) != 0)
> - BUG();
> - sb->s_dirt = 0;
> -}
> -
> static int ocfs2_sync_fs(struct super_block *sb, int wait)
> {
> int status;
> tid_t target;
> struct ocfs2_super *osb = OCFS2_SB(sb);
>
> - sb->s_dirt = 0;
> -
> if (ocfs2_is_hard_readonly(osb))
> return -EROFS;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
"The cynics are right nine times out of ten."
- H. L. Mencken
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-04-28 16:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/5] ext3: " Christoph Hellwig
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.