From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Cc: Michael Rubin <mrubin@google.com>
Subject: [PATCH 1/5] revert check_dirty_inode_list.patch
Date: Tue, 02 Oct 2007 16:41:44 +0800 [thread overview]
Message-ID: <391315778.14430@ustc.edu.cn> (raw)
Message-ID: <20071002090254.489150786@mail.ustc.edu.cn> (raw)
In-Reply-To: 20071002084143.110486039@mail.ustc.edu.cn
[-- Attachment #1: revert-check_dirty_inode_list.patch --]
[-- Type: text/plain, Size: 3766 bytes --]
Revert the check_dirty_inode_list.patch.
I'm pretty sure the time ordering problem has gone.
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---
fs/fs-writeback.c | 62 --------------------------------------------
kernel/sysctl.c | 8 -----
2 files changed, 1 insertion(+), 69 deletions(-)
--- linux-2.6.23-rc8-mm2.orig/fs/fs-writeback.c
+++ linux-2.6.23-rc8-mm2/fs/fs-writeback.c
@@ -25,57 +25,6 @@
#include <linux/buffer_head.h>
#include "internal.h"
-int sysctl_inode_debug __read_mostly;
-
-static int __check(struct super_block *sb, int print_stuff)
-{
- struct list_head *cursor = &sb->s_dirty;
- unsigned long dirtied_when = 0;
-
- while ((cursor = cursor->prev) != &sb->s_dirty) {
- struct inode *inode = list_entry(cursor, struct inode, i_list);
- if (print_stuff) {
- printk("%p:%lu\n", inode, inode->dirtied_when);
- } else {
- if (dirtied_when &&
- time_before(inode->dirtied_when, dirtied_when))
- return 1;
- dirtied_when = inode->dirtied_when;
- }
- }
- return 0;
-}
-
-static void __check_dirty_inode_list(struct super_block *sb,
- struct inode *inode, const char *file, int line)
-{
- if (!sysctl_inode_debug)
- return;
-
- if (__check(sb, 0)) {
- sysctl_inode_debug = 0;
- if (inode)
- printk("%s:%d: s_dirty got screwed up. inode=%p:%lu\n",
- file, line, inode, inode->dirtied_when);
- else
- printk("%s:%d: s_dirty got screwed up\n", file, line);
- __check(sb, 1);
- }
-}
-
-#define check_dirty_inode_list(sb) \
- do { \
- if (unlikely(sysctl_inode_debug)) \
- __check_dirty_inode_list(sb, NULL, __FILE__, __LINE__); \
- } while (0)
-
-#define check_dirty_inode(inode) \
- do { \
- if (unlikely(sysctl_inode_debug)) \
- __check_dirty_inode_list(inode->i_sb, inode, \
- __FILE__, __LINE__); \
- } while (0)
-
/**
* __mark_inode_dirty - internal function
* @inode: inode to mark
@@ -174,10 +123,8 @@ void __mark_inode_dirty(struct inode *in
* reposition it (that would break s_dirty time-ordering).
*/
if (!was_dirty) {
- check_dirty_inode(inode);
inode->dirtied_when = jiffies;
list_move(&inode->i_list, &sb->s_dirty);
- check_dirty_inode(inode);
}
}
out:
@@ -206,7 +153,6 @@ static void redirty_tail(struct inode *i
{
struct super_block *sb = inode->i_sb;
- check_dirty_inode(inode);
if (!list_empty(&sb->s_dirty)) {
struct inode *tail_inode;
@@ -216,7 +162,6 @@ static void redirty_tail(struct inode *i
inode->dirtied_when = jiffies;
}
list_move(&inode->i_list, &sb->s_dirty);
- check_dirty_inode(inode);
}
/*
@@ -430,11 +375,8 @@ int generic_sync_sb_inodes(struct super_
spin_lock(&inode_lock);
- if (!wbc->for_kupdate || list_empty(&sb->s_io)) {
- check_dirty_inode_list(sb);
+ if (!wbc->for_kupdate || list_empty(&sb->s_io))
list_splice_init(&sb->s_dirty, &sb->s_io);
- check_dirty_inode_list(sb);
- }
while (!list_empty(&sb->s_io)) {
int err;
@@ -499,10 +441,8 @@ int generic_sync_sb_inodes(struct super_
if (!ret)
ret = err;
if (wbc->sync_mode == WB_SYNC_HOLD) {
- check_dirty_inode(inode);
inode->dirtied_when = jiffies;
list_move(&inode->i_list, &sb->s_dirty);
- check_dirty_inode(inode);
}
if (current_is_pdflush())
writeback_release(bdi);
--- linux-2.6.23-rc8-mm2.orig/kernel/sysctl.c
+++ linux-2.6.23-rc8-mm2/kernel/sysctl.c
@@ -1206,14 +1206,6 @@ static struct ctl_table fs_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
- {
- .ctl_name = CTL_UNNUMBERED,
- .procname = "inode_debug",
- .data = &sysctl_inode_debug,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = &proc_dointvec,
- },
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
{
.ctl_name = CTL_UNNUMBERED,
--
next prev parent reply other threads:[~2007-10-02 9:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071002084143.110486039@mail.ustc.edu.cn>
2007-10-02 8:41 ` [PATCH 0/5] sluggish writeback fixes Fengguang Wu
2007-10-03 11:04 ` Martin Knoblauch
[not found] ` <20071002090254.489150786@mail.ustc.edu.cn>
2007-10-02 8:41 ` Fengguang Wu [this message]
[not found] ` <20071002090254.596842343@mail.ustc.edu.cn>
2007-10-02 8:41 ` [PATCH 2/5] writeback: fix time ordering of the per superblock inode lists 8 Fengguang Wu
[not found] ` <20071002090254.728493507@mail.ustc.edu.cn>
2007-10-02 8:41 ` [PATCH 3/5] writeback: fix ntfs with sb_has_dirty_inodes() Fengguang Wu
[not found] ` <20071002090254.987182999@mail.ustc.edu.cn>
2007-10-02 8:41 ` [PATCH 5/5] writeback: introduce writeback_control.more_io to indicate more io Fengguang Wu
2007-10-02 21:47 ` David Chinner
[not found] ` <20071003013439.GA6501@mail.ustc.edu.cn>
2007-10-03 1:34 ` Fengguang Wu
2007-10-03 2:41 ` David Chinner
[not found] ` <20071004022133.GA6244@mail.ustc.edu.cn>
2007-10-04 2:21 ` Fengguang Wu
2007-10-04 5:03 ` David Chinner
[not found] ` <20071005033652.GA6448@mail.ustc.edu.cn>
2007-10-05 3:36 ` Fengguang Wu
2007-10-05 7:41 ` David Chinner
[not found] ` <20071005115508.GA9998@mail.ustc.edu.cn>
2007-10-05 11:55 ` Fengguang Wu
[not found] ` <20071002090254.873023041@mail.ustc.edu.cn>
2007-10-02 8:41 ` [PATCH 4/5] writeback: remove pages_skipped accounting in __block_write_full_page() Fengguang Wu
2007-10-04 21:26 ` Andrew Morton
2007-10-02 21:55 ` David Chinner
[not found] ` <20071003014333.GB6501@mail.ustc.edu.cn>
2007-10-03 1:43 ` Fengguang Wu
2007-10-03 2:22 ` David Chinner
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=391315778.14430@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=linux-kernel@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