lkml.org 
[lkml]   [2009]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 14/17] xfs: Use new syncing helper
    On Wed, Aug 19, 2009 at 06:04:41PM +0200, Jan Kara wrote:
    > diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
    > index 7078974..aeb5a39 100644
    > --- a/fs/xfs/linux-2.6/xfs_lrw.c
    > +++ b/fs/xfs/linux-2.6/xfs_lrw.c
    > @@ -817,7 +817,7 @@ write_retry:
    > xfs_iunlock(xip, iolock);
    > if (need_i_mutex)
    > mutex_unlock(&inode->i_mutex);
    > - error2 = sync_page_range(inode, mapping, pos, ret);
    > + error2 = generic_write_sync(file, pos, ret);

    I don't think this is very optimal for XFS. This first starts an
    asynchronous writeout of the range in generic_write_sync,
    then calls into ->fsync which waits for all I/O on the file to finish,
    then forces the log inside xfs_fsync, then waits for the range again in
    generic_write_sync, and after this code calls into
    xfs_write_sync_logforce which forces to log _again_.

    We should be fine just doing your new filemap_fdatawrite_range helper
    here and let xfs_write_sync_logforce do the work. Long term we should
    just get rid of this stupid submit writes before syncing the iode, then
    wait crap which is a pain for all modern filesystems.


    \
     
     \ /
      Last update: 2009-08-19 18:35    [W:4.306 / U:0.740 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site