lkml.org 
[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] fs: avoid I_NEW inodes
On Wed 11-03-09 03:34:30, Nick Piggin wrote:
> On Tue, Mar 10, 2009 at 05:03:21PM +0100, Jan Kara wrote:
> > > Index: linux-2.6/fs/drop_caches.c
> > > ===================================================================
> > > --- linux-2.6.orig/fs/drop_caches.c
> > > +++ linux-2.6/fs/drop_caches.c
> > > @@ -18,7 +18,7 @@ static void drop_pagecache_sb(struct sup
> > >
> > > spin_lock(&inode_lock);
> > > list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
> > > - if (inode->i_state & (I_FREEING|I_WILL_FREE))
> > > + if (inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW))
> > > continue;
> > > if (inode->i_mapping->nrpages == 0)
> > > continue;
> > > Index: linux-2.6/fs/inode.c
> > > ===================================================================
> > > --- linux-2.6.orig/fs/inode.c
> > > +++ linux-2.6/fs/inode.c
> > > @@ -356,6 +356,8 @@ static int invalidate_list(struct list_h
> > > if (tmp == head)
> > > break;
> > > inode = list_entry(tmp, struct inode, i_sb_list);
> > > + if (inode->i_state & I_NEW)
> > > + continue;
> > If somebody is setting up inodes at this point, we are in serious
> > trouble I think. So WARN_ON would be more appropriate I think.
>
> Really? Hmm, this is also called via flush_disk which seems like it
> can operate under a mounted filesystem?
Ah, I was not following calls far enough. You're right.

Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2009-03-11 13:25    [W:0.559 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site