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

Re: Taking mirror Backup of SVN Repos through 3rd Party Software

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 30 Jun 2011 22:13:27 +0300

Les Mikesell wrote on Thu, Jun 30, 2011 at 13:56:27 -0500:
> On 6/30/2011 1:15 PM, Andreas Krey wrote:
> >On Thu, 30 Jun 2011 11:35:17 +0000, Les Mikesell wrote:
> >...
> >>I think you are being way too optimistic about real-world filesystems
> >>and disk and controller caches. It is possible to make a system that
> >>behaves with the ideal behavior you describe - and maybe many do in
> >>terms of the filenames and directory entries.
> >
> >Actually, more like for reads and writes into/from a single file;
> >a full sync() tends to be a bit expensive.
>
> At least for older versions of linux and some of its filesystems
> there is no difference between an fsync() and a sync() because it
> didn't really track the per-file dirty cache. I assume that is
> fixed in current versions but don't really know. Even now, I don't
> think it always propagates through the LVM and filesystem layers
> reliably. And if your raid controller has a cache without a battery
> backup.
>

There is this bit of Linux-specific code in FSFS:

    /* Linux has the unusual feature that fsync() on a file is not
       enough to ensure that a file's directory entries have been
       flushed to disk; you have to fsync the directory as well.
       On other operating systems, we'd only be asking for trouble
       by trying to open and fsync a directory. */
Received on 2011-06-30 21:14:57 CEST

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