lkml.org 
[lkml]   [2012]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: inode->i_wb_list corruption.
On Wed, Mar 7, 2012 at 6:42 PM, Jan Kara <jack@suse.cz> wrote:
> On Tue 06-03-12 23:26:08, Wu Fengguang wrote:
>  Umm, it's not *that* simple I'd say. E.g. sysfs doesn't provide
> alloc_inode() method so we use inode_cachep for allocations. And that cache
> is configured to use inode_init_once().
>
> Also note that the error message is:
> list_del corruption. prev->next should be ffff8801c2f41b18, but was (null)
>
> Which means that our inode had correct i_wb_list.prev but the previous
> inode had NULL in i_wb_list.next. But that means that both inodes were
> linked into the list at some point. So it does not seem like an
> initialization issue to me...
>
>                                                                Honza
>
I still want to know how to reproduce this bug. I add the following
patch to the kernel fc-16 3.2.9-1

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 5b4a936..568ed0a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -192,8 +192,13 @@ void bdi_start_background_writeback(struct
backing_dev_info *bdi)
void inode_wb_list_del(struct inode *inode)
{
struct backing_dev_info *bdi = inode_to_bdi(inode);
+ struct list_head *pos;

spin_lock(&bdi->wb.list_lock);
+ list_for_each(pos, &inode->i_wb_list) {
+ printk(KERN_EMERG "list entry: %p; next: %p; prev: %p",
+ pos, pos->next, pos->prev);
+ }
list_del_init(&inode->i_wb_list);
spin_unlock(&bdi->wb.list_lock);
}
So on every inode_wb_list_del, it will show the whole list.

and Doing while true; do touch a && rm -f a; done for almost one day
without any problem.

So How to reproduce it??

Thanks,
Yang
--
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/

\
 
 \ /
  Last update: 2012-03-09 09:37    [W:0.103 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site