SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
cygwin fsyncing again
Author Message
Post cygwin fsyncing again 
Dave Kempe <dave < at > solutionsfirst.com.au>
wrote the following on Thu, 29 Sep 2005 09:02:49 +1000
Hi,
I am trying to get rdiff-backup 1.0.1 going on cygwin. I will have a
windows package built shortly, but I would love it if windows-> windows
backups worked.
the initial backup works ok, but after the session stats are printed at
the end I get an error similar to the one below. Thats fine, but
subsequent backups crash with the error below before copying any files.
I think os.fsync is not available on cygwin python2.4 and is erroneously
turned on...

Let me know if there any other information you need to help me out - is
there some way I can turn off fsyncing on cygwin?

rdiff-backup needs some way to order writes. For instance, when
updating it sometimes needs to make sure a file is fully written
before it is moved. Many optimized file systems will mess with the
order of these operations for better performance (at least this is
what the ext2/3 people told me).

So without fsync, how can rdiff-backup be guaranteed everything is
written in the right order?

It would be easy to add a check and then just disable fsyncing if it's
not available, but I don't think this would be entirely safe.


--
Ben Escoto

Post cygwin fsyncing again 
Ben Escoto wrote:
It would be easy to add a check and then just disable fsyncing if it's
not available, but I don't think this would be entirely safe.



since we are using windows, we have come to accept we don't live in an
ideal world Smile I think we are prepared to accept not entirely safe.
Perhaps a warning at the start of the backup might be sufficient :)

dave

Post cygwin fsyncing again 
David Kempe <dave < at > solutionsfirst.com.au>
wrote the following on Sat, 15 Oct 2005 12:37:57 +1000

since we are using windows, we have come to accept we don't live in
an ideal world Smile I think we are prepared to accept not entirely
safe. Perhaps a warning at the start of the backup might be
sufficient :)

That shouldn't be too hard, but is there really no better solution?
Why doesn't windows have fsync? I mean, it must have some system call
that does exactly the same thing, but cygwin just doesn't map it?

If there's no way to do it then I'll just add a test to fs_abilities,
and display that warning you mentioned if the filesystem doesn't
support fsync.


--
Ben Escoto

Post cygwin fsyncing again 
Ben Escoto wrote:
That shouldn't be too hard, but is there really no better solution?
Why doesn't windows have fsync? I mean, it must have some system call
that does exactly the same thing, but cygwin just doesn't map it?

From my reading it seems that the python2.4/cygwin version I have got
should support it - there was fsync bugs in older versions.
How do i do a test to see if it works - do you have a simple test script
I can run? Disabling it is not optimal i agree, but a warning would be
sufficient I think.

thanks

dave

Post cygwin fsyncing again 
David Kempe <dave < at > solutionsfirst.com.au>
wrote the following on Sun, 16 Oct 2005 13:50:07 +1000

From my reading it seems that the python2.4/cygwin version I have
got should support it - there was fsync bugs in older versions. How
do i do a test to see if it works - do you have a simple test script
I can run? Disabling it is not optimal i agree, but a warning would
be sufficient I think.

I remember an fsync bug in python that caused some problems for me,
but I thought the issue was that it was just missing from the os
module. Maybe there is a different bug in cygwin's fsync.

Anyway, for a simple script, try this:

echo testing > fsync-testfile
python -c 'import os; os.fsync(os.open("fsync-testfile", os.O_RDONLY))'
rm fsync-testfile

if it works, python won't say anything.


--
Ben Escoto

Post cygwin fsyncing again 
Ben Escoto wrote:
if it works, python won't say anything.



That didn't work for some reason.

I think this is the same error rdiff-backup gives:

Traceback (most recent call last):
File "<string>", line 1, in ?
OSError: [Errno 13] Permission denied

google doesn't show anything obvious as to why this is happening. For
now, disabling it with a test might be the way to go, with a warning...

dave

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB