Re: O_SYNC: How well do we support it?

From: Peter Rival (frival@zk3.dec.com)
Date: Fri Jan 07 2000 - 09:47:54 EST


"Stephen C. Tweedie" wrote:

> Hi,
>
> On Wed, 05 Jan 2000 14:29:25 -0500, Peter Rival <frival@zk3.dec.com>
> said:
>
> > Very good to hear. :) I, being the know-nothing in filesystems that I
> > am, have looked at it a little. I added back the updating of
> > inode->u.ext2_i.i_osync in ext2_file_write (before and after
> > generic_file_write), and I added this into generic_file_write right
> > after the call to write_one_page (which is really
> > block_write_partial_page):
>
> > if (file->f_flags & O_SYNC)
> > writeout_one_page(page);
>
> > and that seems to have made some difference in the behavior, but I don't
> > think that it's all that's necessary.
>
> No, it's probably not. We also want to get fdatasync() working right,
> so there's a bit more than this involved.
>

Yup, I was only looking at the O_SYNC code, as that's the only sync work that
AIM does. I'll take a peek at the fdatasync() stuff as well. BTW, I believe
that the O_SYNC flag also requires that (for strict POSIX compliance) we
write out the updated metadata (mtime, etc.) synchronously as well as the
data. However, I also know that some operating systems don't do this unless
specifically requested by the user due to the additional performance
overhead. Should we add in the capacity to perform synchronous metadata
updating as well? Or perhaps better, just how much of a hack was the above?
:) Thanks!

 - Pete

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:08 EST