lkml.org 
[lkml]   [2001]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: VM deadlock

On Friday, June 29, 2001 12:08:37 AM +1000 Andrew Morton
<andrewm@uow.edu.au> wrote:

> The reason ->write_inode() can be a no-op is that __sync_one()
> marks the inode clean, then calls ->write_inode(). We *know*
> that we took a copy of the inode in mark_inode_dirty(), so
> we don't need to do anything.

Yes, the only exception is that write_inode needs to honor the sync flag,
at least when not called under PF_MEMALLOC. The biggest reason I can find
so far is knfsd, who calls write_inode_now and expects the inode to be
securely on disk. It doesn't call mark_inode_dirty directly, it calls some
FS func (link, create, whatever) and then uses write_inode_now to commit.

>
> Of course this absolutely requires all inode dirtiers to
> call mark_inode_dirty() after doing the dirty, which is a risk.
> But we face that risk with the PF_MEMALLOC case anyway. No
> problems have appeared in testing.

I haven't seen any problems caused by it yet, but that might be because
reiserfs does all the important inode writes on its own. I believe
generic_commit_write is the only place outside the FS that calls
mark_inode_dirty with something other than an atime update.

-chris

-
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: 2005-03-22 12:55    [W:0.038 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site