Linux-f2fs-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Hongwei <glqhw@qq.com>
Cc: linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] Can F2FS roll forward after fdatasync()?
Date: Thu, 28 May 2020 10:26:06 -0700	[thread overview]
Message-ID: <20200528172606.GA153385@google.com> (raw)
In-Reply-To: <tencent_DCCAEE9137D2150CB266BD2CF3EDF98A970A@qq.com>

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

  reply	other threads:[~2020-05-28 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 15:34 [f2fs-dev] Can F2FS roll forward after fdatasync()? Hongwei
2020-05-28 17:26 ` Jaegeuk Kim [this message]
2020-05-29 13:02   ` Hongwei
2020-06-03 17:18     ` Jaegeuk Kim
2020-06-04 13:24       ` Hongwei Qin
     [not found]       ` <CAKvRR0QjB8u-MnG7om5skFAg_y68vb5b2jjL-VdMOFhHcKqc2g@mail.gmail.com>
     [not found]         ` <20200604161332.GA187121@google.com>
2020-06-05  4:19           ` Hongwei Qin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200528172606.GA153385@google.com \
    --to=jaegeuk@kernel.org \
    --cc=glqhw@qq.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox