lkml.org 
[lkml]   [2009]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: ext2 + -osync: not as easy as it seems
    On Wed, Jan 14, 2009 at 03:37:56PM +0100, Jan Kara wrote:
    > > Um, we have that already; the sync_inode() followed by
    > > blkdev_issue_flush() is the path taken by fdatasync(), I do believe.
    >
    > Maybe ext4-patch-queue changes that area but in Linus's tree I see:
    >
    > if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
    > goto out;
    >
    > So if we just overwrite some data, we send them to disk via fdatawrite()
    > and then we quickly bail out from ext4_sync_file() without doing
    > blkdev_issue_flush().

    So you're thinking about fdatawrite() being called by some code path
    other than ext4_sync_file() before we call fsync()? Yeah, that could
    happen.... I think that will only happen if the file is opened
    O_SYNC, but that raises another issue, which is that we're not forcing
    a flush for writes when the file is opened O_SYNC.

    - Ted


    \
     
     \ /
      Last update: 2009-01-14 18:05    [W:2.627 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site