mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Zhiguo Niu <zhiguo.niu@unisoc.com>, jaegeuk@kernel.org
Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, niuzhiguo84@gmail.com,
	ke.wang@unisoc.com
Subject: Re: [PATCH] f2fs: fix to record both APPEND and UPDATE ino entries
Date: Thu, 10 Sep 2026 14:36:56 +0800	[thread overview]
Message-ID: <ee7e034f-82ac-4de6-a368-4ff5e42eac65@kernel.org> (raw)
In-Reply-To: <20260910030243.3005578-1-zhiguo.niu@unisoc.com>

On 9/10/26 11:02, Zhiguo Niu wrote:
> In f2fs_post_evict_inode(), record_bits is assigned with BIT(APPEND_INO)
> and BIT(UPDATE_INO) respectively, so the second assignment overwrites
> the first one: when both FI_APPEND_WRITE and FI_UPDATE_WRITE are set,
> only the UPDATE_INO entry is recorded.
> 
> The two flags are not mutually exclusive.Once the APPEND_INO entry is
> lost after the inode eviction, the shortcut in f2fs_do_sync_file() can
> take the flush_out path in the next fsync(), skipping f2fs_fsync_node_pages().
> As a result, the dnodes holding the newly allocated blocks are not
> fsync-marked, and after a sudden power loss, the data appended before the
> eviction is silently lost.
> 
> This restores the previous behavior where the two ino entries were
> added independently.
> 
> Fixes: 314c9e476ffc ("f2fs: call __add_ino_entry out of the eviction path")
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

      reply	other threads:[~2026-09-10  6:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  3:02 Zhiguo Niu
2026-09-10  6:36 ` Chao Yu [this message]

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=ee7e034f-82ac-4de6-a368-4ff5e42eac65@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=ke.wang@unisoc.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niuzhiguo84@gmail.com \
    --cc=zhiguo.niu@unisoc.com \
    /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

all inboxes | Powered by JetHome®