Re: 2.4.15-pre9 breakage (inode.c)

From: Andrea Arcangeli (andrea@suse.de)
Date: Sat Nov 24 2001 - 00:47:39 EST


On Fri, Nov 23, 2001 at 04:22:17PM -0500, Alexander Viro wrote:
> Sigh... Supposed fix to problems with stale inodes was completely
> broken.
>
> What we need is "if we are doing last iput() on fs that is getting
> shut, sync it and don't leave it in cache". And yes, we have a similar

What's this "stale inode" problem? invalidate_inodes in kill_super will
obviously get rid of all of them or we would be getting the
"selfdestructing in 5 seconds" message all the time.

I'm probably missing something, but actually to me it seems the patch in
pre9 plus this your further fix are completly superflous. And if you
mean that there's a race in the sync+invalidate_inode sequence (I didn't
checked) that should be serialized at the higher dcache/mnt layer,
without messing and slowing down all of the iput()s just for the unmount
case where the fsync+invalidate can be serialized by design at the mnt
layer without iput intervention. I actually believe this is the right
fix and it should work fine as far as anything <= 2.4.15pre8 was working
correctly. I'm going to release a 2.4.15aa1 with the below fix applied
(while waiting your comments of course, thanks!).

--- 2.4.15pre9aa1/fs/inode.c.~1~ Thu Nov 22 20:48:23 2001
+++ 2.4.15pre9aa1/fs/inode.c Sat Nov 24 06:30:20 2001
@@ -1071,7 +1071,7 @@
                         if (inode->i_state != I_CLEAR)
                                 BUG();
                 } else {
- if (!list_empty(&inode->i_hash) && sb && sb->s_root) {
+ if (!list_empty(&inode->i_hash)) {
                                 if (!(inode->i_state & (I_DIRTY|I_LOCK))) {
                                         list_del(&inode->i_list);
                                         list_add(&inode->i_list, &inode_unused);

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 30 2001 - 21:00:16 EST