Return-Path: Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: (qmail 85851 invoked from network); 3 Aug 2010 12:26:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Aug 2010 12:26:10 -0000 Received: (qmail 90974 invoked by uid 500); 3 Aug 2010 12:26:10 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 90775 invoked by uid 500); 3 Aug 2010 12:26:07 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 90768 invoked by uid 99); 3 Aug 2010 12:26:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Aug 2010 12:26:06 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [213.41.242.187] (HELO prunille.vinc17.org) (213.41.242.187) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Aug 2010 12:25:58 +0000 Received: by prunille.vinc17.org (Postfix, from userid 501) id C28FD52C9B2E; Tue, 3 Aug 2010 14:25:37 +0200 (CEST) Date: Tue, 3 Aug 2010 14:25:37 +0200 From: Vincent Lefevre To: users@subversion.apache.org Subject: Re: Support for filesystem snapshots (?) Message-ID: <20100803122537.GH7288@prunille.vinc17.org> Mail-Followup-To: users@subversion.apache.org References: <6EC02A00CC9F684DAF4AF4084CA84D5F01C40CB5@DRMBX3.winmail.deshaw.com> <20100802161739.GI3967@ted.stsp.name> <4C56F278.9030904@gmail.com> <6EC02A00CC9F684DAF4AF4084CA84D5F01C40CBC@DRMBX3.winmail.deshaw.com> <20100802175621.GL3967@ted.stsp.name> <6EC02A00CC9F684DAF4AF4084CA84D5F01C40CD7@DRMBX3.winmail.deshaw.com> <20100802202736.GO3967@ted.stsp.name> <6EC02A00CC9F684DAF4AF4084CA84D5F01C40CE1@DRMBX3.winmail.deshaw.com> <4C5730D3.8060507@gmail.com> <6EC02A00CC9F684DAF4AF4084CA84D5F01C40CEE@DRMBX3.winmail.deshaw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6EC02A00CC9F684DAF4AF4084CA84D5F01C40CEE@DRMBX3.winmail.deshaw.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-6088-vl-r38367 (2010-07-31) X-Virus-Checked: Checked by ClamAV on apache.org On 2010-08-02 18:09:26 -0400, Vallon, Justin wrote: > If the client or server filesystem buffers are dirty, then the > application has not flushed the data. There can be a flush at the application level (e.g. fflush() function in C), but this doesn't mean that the flush is also done at the file system level (physically), in particular with NFS. FYI, the fflush(3) Linux man page says: NOTES Note that fflush() only flushes the user space buffers provided by the C library. To ensure that the data is physically stored on disk the kernel buffers must be flushed too, for example, with sync(2) or fsync(2). But even sync() may not be sufficient: BUGS According to the standard specification (e.g., POSIX.1-2001), sync() schedules the writes, but may return before the actual writing is done. However, since version 1.3.20 Linux does actually wait. (This still does not guarantee data integrity: modern disks have large caches.) Ditto for fsync: If the underlying hard disk has write caching enabled, then the data may not really be on permanent storage when fsync() / fdatasync() return. > Therefore, the application should make no assumption about whether > the data has been written through to its final media. What is > critical is that (a) everything gets flushed, then (b) current is > updated, then (c) current is flushed. I don't think this can be guaranteed just by looking at the application code. Only the kernel and the filesystem implementation can document whether the system calls are taken into account as expected. Note: using fcntl locking (possibly in addition to other methods) can also be useful. [...] > All of this can get thrown out the window if the server decides to > "lie". See http://nfs.sourceforge.net/nfs-howto/ar01s05.html, > section 5.9, where it describes how the Linux async NFS export > option can cause the NFS server to lie when asked to fsync or > flush-on-close. The problem here is that the server might keep the > revs (part 1) in cache, while writing out the current file (part 3), > leaving a corrupted repository if the server fails. So, this is a > problem in general, not specific to filesystem snapshots. Yes. -- Vincent Lef�vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Ar�naire project (LIP, ENS-Lyon)