[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TAKE - make "osyncisdsync" the default



Eric Sandeen wrote:
> 
> "osyncisdsync" makes us go faster, and it's how other Linux
> filesystems are set up, anyway - so make it the default.
> 

The comment lies :)

        /* For now, when the user asks for O_SYNC, we'll actually
         * provide O_DSYNC. */
        if (status >= 0) {
                if ((file->f_flags & O_SYNC) || IS_SYNC(inode))
                        status = generic_osync_inode(inode, OSYNC_METADATA|OSYNC_DATA);
        }

On other filesystems, O_SYNC writes actually sync both metadata
and data, as well as the inode, if i_size changed.

For default behaviour I suggest the best semantics are for
an O_SYNC write to guarantee that the written data will be
available after a crash.