[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: RFC: svn_io_file_flush_to_disk

From: Josh Pieper <jpieper_at_andrew.cmu.edu>
Date: 2004-05-01 16:23:11 CEST

Branko ??ibej wrote:
> Josh Pieper wrote:
> >
> >Should this go into APR instead? If so, what is the proper process to
> >get it there, post on the APR dev list and wait?
> >
> >
> Yes, it should go into APR. But there's no need to wait -- quite a few
> SVN committers are also APR committers, so it should go smoothly once
> the patch for APR is ready. But we still need a fallback in svn_io
> because we can't require the absolutely latest version of APR.
>
> >+ apr_os_file_get (&filehand, file);
> >
> >
> You can move these two lines outside the ifdef:
>
> apr_os_file_t filehand;
> apr_if_file_get (&filehand, file)
>
> The less conditional code we have, the better I'll like it.

Will do.

>
> >+ FlushFileBuffers (filehand);
> >
> >
> How about checking the return value here, too?

I would have, but I don't know how. I copied the code for flushing on
Windows verbatim from another APR function, which did not check the
error code.

> Of course, on Windows it would be much better if APR knew how to open
> the file with FILE_FLAG_WRITETHROUGH...perhaps another flag to
> apr_file_open that would cause apr_file_close to call fsync on Unix, but
> open the file in writethrough mode on Windows?

Ummm, I have no access to Windows systems and the only developer
documentation I have is the online MSDN thing, which isn't that
pleasant to use. Can I check this in with moving those two lines out
of the conditional and let you/other Win32 experts handle the Windows
side of things?

-Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 1 16:23:30 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.