From: "Artem B. Bityuckiy" <dedekind@infradead.org>
To: steve <steve@friservices.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Andrew Morton <akpm@osdl.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: 2.6.12-rc4-mm1
Date: Wed, 18 May 2005 14:06:31 +0400 [thread overview]
Message-ID: <1116410791.20667.5.camel@sauron.oktetlabs.ru> (raw)
In-Reply-To: <42854F34.2070806@friservices.com>
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
Steve,
> okay, reproduced after a couple hours of running (nothing intensive),
> then doing a grep blah -r /*
I can't reproduce your problem using 2.6.12-rc4 + the 2 patches.
I created 50GB Reiserfs partition, copied a lot of data there (built
linux sources in many exemplars) and issued 'grep -r blah *'. I also
tried it with parallel writing to the partition - no help.
I wonder, could you please try 2.6.12-rc4 + the 2 patches and see if the
warning still there ?
The above referred patches are (and they are also attached):
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-
rc4/2.6.12-rc4-mm1/broken-out/vfs-bugfix-two-read_inode-calles-
without.patch
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc4/2.6.12-rc4-mm1/broken-out/__wait_on_freeing_inode-fix.patch
P.S. I wanted to try 2.6.12-rc4-mm2, but it OOPSes during the kernel
load in my system. Then I switched to 2.6.12-rc4 in order not to fight
with -mm2's problems.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
[-- Attachment #2: vfs-bugfix-two-read_inode-calles-without.patch --]
[-- Type: text/x-patch, Size: 1184 bytes --]
diff -puN fs/inode.c~vfs-bugfix-two-read_inode-calles-without fs/inode.c
--- 25/fs/inode.c~vfs-bugfix-two-read_inode-calles-without Fri May 6 15:12:47 2005
+++ 25-akpm/fs/inode.c Fri May 6 15:12:47 2005
@@ -282,6 +282,13 @@ static void dispose_list(struct list_hea
if (inode->i_data.nrpages)
truncate_inode_pages(&inode->i_data, 0);
clear_inode(inode);
+
+ spin_lock(&inode_lock);
+ hlist_del_init(&inode->i_hash);
+ list_del_init(&inode->i_sb_list);
+ spin_unlock(&inode_lock);
+
+ wake_up_inode(inode);
destroy_inode(inode);
nr_disposed++;
}
@@ -317,8 +324,6 @@ static int invalidate_list(struct list_h
inode = list_entry(tmp, struct inode, i_sb_list);
invalidate_inode_buffers(inode);
if (!atomic_read(&inode->i_count)) {
- hlist_del_init(&inode->i_hash);
- list_del(&inode->i_sb_list);
list_move(&inode->i_list, dispose);
inode->i_state |= I_FREEING;
count++;
@@ -439,8 +444,6 @@ static void prune_icache(int nr_to_scan)
if (!can_unuse(inode))
continue;
}
- hlist_del_init(&inode->i_hash);
- list_del_init(&inode->i_sb_list);
list_move(&inode->i_list, &freeable);
inode->i_state |= I_FREEING;
nr_pruned++;
[-- Attachment #3: __wait_on_freeing_inode-fix.patch --]
[-- Type: text/x-patch, Size: 1655 bytes --]
diff -puN fs/inode.c~__wait_on_freeing_inode-fix fs/inode.c
--- 25/fs/inode.c~__wait_on_freeing_inode-fix 2005-05-09 20:09:33.000000000 -0700
+++ 25-akpm/fs/inode.c 2005-05-09 20:09:33.000000000 -0700
@@ -1241,29 +1241,21 @@ int inode_wait(void *word)
}
/*
- * If we try to find an inode in the inode hash while it is being deleted, we
- * have to wait until the filesystem completes its deletion before reporting
- * that it isn't found. This is because iget will immediately call
- * ->read_inode, and we want to be sure that evidence of the deletion is found
- * by ->read_inode.
+ * If we try to find an inode in the inode hash while it is being
+ * deleted, we have to wait until the filesystem completes its
+ * deletion before reporting that it isn't found. This function waits
+ * until the deletion _might_ have completed. Callers are responsible
+ * to recheck inode state.
+ *
+ * It doesn't matter if I_LOCK is not set initially, a call to
+ * wake_up_inode() after removing from the hash list will DTRT.
+ *
* This is called with inode_lock held.
*/
static void __wait_on_freeing_inode(struct inode *inode)
{
wait_queue_head_t *wq;
DEFINE_WAIT_BIT(wait, &inode->i_state, __I_LOCK);
-
- /*
- * I_FREEING and I_CLEAR are cleared in process context under
- * inode_lock, so we have to give the tasks who would clear them
- * a chance to run and acquire inode_lock.
- */
- if (!(inode->i_state & I_LOCK)) {
- spin_unlock(&inode_lock);
- yield();
- spin_lock(&inode_lock);
- return;
- }
wq = bit_waitqueue(&inode->i_state, __I_LOCK);
prepare_to_wait(wq, &wait.wait, TASK_UNINTERRUPTIBLE);
spin_unlock(&inode_lock);
next prev parent reply other threads:[~2005-05-18 10:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050512033100.017958f6.akpm@osdl.org>
[not found] ` <4284BF66.1050704@friservices.com>
2005-05-13 18:13 ` 2.6.12-rc4-mm1 David Woodhouse
2005-05-14 1:07 ` 2.6.12-rc4-mm1 steve
2005-05-18 10:06 ` Artem B. Bityuckiy [this message]
2005-05-18 16:16 ` 2.6.12-rc4-mm1 Steve Roemen
2005-05-19 16:45 ` 2.6.12-rc4-mm1 David Woodhouse
2005-05-19 17:55 ` 2.6.12-rc4-mm1 Steve Roemen
2005-05-19 18:04 ` 2.6.12-rc4-mm1 David Woodhouse
2005-05-19 20:12 ` 2.6.12-rc4-mm1 Steve Roemen
2005-05-19 20:21 ` 2.6.12-rc4-mm1 David Woodhouse
[not found] ` <428508BB.8030604@friservices.com>
2005-05-14 10:46 ` 2.6.12-rc4-mm1 Artem B. Bityuckiy
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=1116410791.20667.5.camel@sauron.oktetlabs.ru \
--to=dedekind@infradead.org \
--cc=akpm@osdl.org \
--cc=dwmw2@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=steve@friservices.com \
/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).