Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762690AbZCaV1z (ORCPT ); Tue, 31 Mar 2009 17:27:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754559AbZCaV1p (ORCPT ); Tue, 31 Mar 2009 17:27:45 -0400 Received: from mail-in-13.arcor-online.net ([151.189.21.53]:34288 "EHLO mail-in-13.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbZCaV1o (ORCPT ); Tue, 31 Mar 2009 17:27:44 -0400 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-07.arcor-online.net 9DB813CA5BF From: Bodo Eggert <7eggert@gmx.de> Subject: Re: replace() system call needed (was Re: EXT4-ish "fixes" in UBIFS) To: Pavel Machek , Artem Bityutskiy , Artem Bityutskiy , Linux Kernel Mailing List Reply-To: 7eggert@gmx.de Date: Tue, 31 Mar 2009 23:27:33 +0200 References: User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-Id: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 781 Lines: 17 Pavel Machek wrote: > My proposal is > > rename() stays. > > replace(src, bar) is rename that ensures that bar will contain valid > data after powerfail. This can be done using implicit logic: ->E.g. on close(), mark inodes without being sync()ed as poisoned. (I can think of more sophisticated logic, but ...) ->On completing the inode with the delayed allocations, unpoison it. ->Don't commit rename()s if the corresponding inode is poisoned. Et Voila, everything replace is supposed to guarantee is guaranteed. -- 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/