From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A29B0C433E0 for ; Thu, 28 May 2020 17:26:17 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E0A72073B; Thu, 28 May 2020 17:26:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="fEtZzE0X"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="hoRtuIYp"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="d8pue2x5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E0A72073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jeMIJ-0003gK-I5; Thu, 28 May 2020 17:26:15 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeMII-0003g8-1l for linux-f2fs-devel@lists.sourceforge.net; Thu, 28 May 2020 17:26:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jgzYOUUXw7mit9StbRzWLWchJi9GCBs3rBdt+gJ0x9U=; b=fEtZzE0XtgjB9iYSPGFPYsuBZz E9T9WNdh+tT/pFnbWtnaVAagw59aR63XQXgWeBYm+qauLi03VktfCjNMXQkD8vwU5beeaqWlA23oV k0wM7xBlJD5H3+TyoSf8k+ueMc+5/oZGWLrhzmoqEVZrN9NlqAhuSf4GgIpIzsKKVyHY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=jgzYOUUXw7mit9StbRzWLWchJi9GCBs3rBdt+gJ0x9U=; b=hoRtuIYp2HliwycixWgqbwTDld eYkHp/KTjOFU/dud+ns0SvPOamfpRd8PKMxBbySy2S2QaCsuDko4KSDWn+7BFeBiou07Z68AFQtd5 3me/KZ0cKwOErd0P+lNT0cgF25KlsS138liiaTcX/UQvCaJp/QkyiYTJi4mFDSKk2W24=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jeMIG-00B5pP-Lz for linux-f2fs-devel@lists.sourceforge.net; Thu, 28 May 2020 17:26:14 +0000 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38E4D2073B; Thu, 28 May 2020 17:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590686767; bh=Nj1T+TXFSd3bW3fDzss/gbSAickMqQUprqIVt6x5ySk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d8pue2x5WkszBbMbfcclE0pjozu5a+F23nPyPkUNBnw611I3Ct084CyNwLbJ4ZBIy A5u3XjMeJ0vL1aI3TGA49uHoHigteREbII5mrYhavwWIxo9NFAPs/3q3I11hMuUUel BsDVoAc49m0d0YoDDLecFhfazVn3CNGnuFDAcxNw= Date: Thu, 28 May 2020 10:26:06 -0700 From: Jaegeuk Kim To: Hongwei Message-ID: <20200528172606.GA153385@google.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1jeMIG-00B5pP-Lz Subject: Re: [f2fs-dev] Can F2FS roll forward after fdatasync()? X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-f2fs-devel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 05/28, Hongwei wrote: > Hi F2FS experts, > As written in f2fs_do_sync_file(): > "Both of fdatasync() and fsync() are able to be recovered from sudden-power-off." > > Please consider this workflow: > 1. Start atomic write > 2. Multiple file writes > 3. Commit atomic write > 4. fdatasync() > 5. Powerloss. > > In the 4th step, the fdatasync() doesn't wait for node writeback. > So we may loss node blocks after powerloss. > > If the data blocks are persisted but node blocks aren't, can the recovery program recover the transaction? #3 will guarantee the blocks written by #2. So, if there's no written between #3 and #4, I think we have nothing to recover. Does this make sense to you? > > Thanks! > > Hongwei > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel