lkml.org 
[lkml]   [2011]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 8/8] fs: add i_op->sync_inode
On Fri, Jan 07, 2011 at 02:24:30AM -0500, Christoph Hellwig wrote:
> On Fri, Jan 07, 2011 at 03:47:34PM +1100, Nick Piggin wrote:
> > No, you misunderstand 1. I am saying they should be treated as
> > WB_SYNC_NONE.
> >
> > In fact 2 would cause much more IO, because dirty writeout would
> > never clean them so it will just keep writing them out. I don't
> > know how 2 could be feasible.
>
> WB_SYNC_NONE means ->write_inode behaves non-blocking. That is
> we do not block on memory allocations, and we do not take locks
> blocking. Most journaling filesystems currently take the easy
> way out an make it a no-op due to that, but take a look at XFS
> how complicated it is to avoid the blocking if you want a non-noop
> implementation.

Btw, there's an easy way how we could get this right, in fact
the write_inode in XFS is already trying to do it, it's just the
caller not copying with it:

- if we can't get locks for a non-blocking ->write_inode we return
EAGAIN, and the callers sets the dirty bits again.


\
 
 \ /
  Last update: 2011-01-07 08:31    [W:0.213 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site