Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762039AbZC3WM0 (ORCPT ); Mon, 30 Mar 2009 18:12:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759681AbZC3WMF (ORCPT ); Mon, 30 Mar 2009 18:12:05 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38339 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756153AbZC3WME (ORCPT ); Mon, 30 Mar 2009 18:12:04 -0400 Date: Tue, 31 Mar 2009 00:11:52 +0200 From: Pavel Machek To: Ric Wheeler Cc: Artem Bityutskiy , Artem Bityutskiy , Linux Kernel Mailing List Subject: Re: replace() system call needed (was Re: EXT4-ish "fixes" in UBIFS) Message-ID: <20090330221152.GD17800@elf.ucw.cz> References: <49CCCB0A.6070701@nokia.com> <20090329122600.GA13737@elf.ucw.cz> <49CF6CBB.7070907@yandex.ru> <20090329124959.GD15492@elf.ucw.cz> <49D0FF1E.3010804@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49D0FF1E.3010804@redhat.com> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 29 Hi! >> My proposal is >> >> rename() stays. >> >> replace(src, bar) is rename that ensures that bar will contain valid >> data after powerfail. >> > > Surely the only way to "insure" this is to spin up the drive, write the > meta-data and data back and make sure that it is not held in volatile > write cache? Well, no. "will contain valid data" but may contain _old_ valid data. So the way to do that would be "wait until you have to spin disk up anyway or until timeout, then write data first, then do rename". AFAICT that's semantics gnome (etc) wants. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/