Linux filesystem development
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Julian Sun <sunjunchao@bytedance.com>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
	brauner@kernel.org, jack@suse.cz, akpm@linux-foundation.org,
	roman.gushchin@linux.dev, dennis@kernel.org
Subject: Re: [PATCH 1/2] writeback: reset dirtied_when when switching wbs
Date: Fri, 16 Oct 2026 11:55:10 -1000	[thread overview]
Message-ID: <ece89688cebc89143733bbe1556f1d5e@kernel.org> (raw)
In-Reply-To: <20261016115230.3640770-2-sunjunchao@bytedance.com>

On Fri, Oct 16, 2026 at 07:52:29PM +0800, Julian Sun wrote:
> When switching a dirty inode to another wb, inode_do_switch_wbs() puts
> it at the newest end of the target b_dirty list instead of searching
> for its sorted position. This requires updating dirtied_when, which
> move_expired_inodes() uses to decide where to stop scanning.
>
> However, the switch updates dirtied_time_when instead. This leaves
> b_dirty out of order and can make the scan stop before reaching older
> inodes. It also resets the lazytime expiration timestamp, potentially
> delaying timestamp writeback.
>
> Update dirtied_when instead, preserving both the constant-time insertion
> and the lazytime expiration timestamp. Correct the field name in the
> comment and document the distinction between the two inode timestamps.
>
> Fixes: 9a6ebbdbd412 ("writeback: Avoid excessively long inode switching times")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Julian Sun <sunjunchao@bytedance.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

  reply	other threads:[~2026-10-16 21:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 11:52 [PATCH 0/2] writeback: fix timestamp and dirty-state handling in wb switches Julian Sun
2026-10-16 11:52 ` [PATCH 1/2] writeback: reset dirtied_when when switching wbs Julian Sun
2026-10-16 21:55   ` Tejun Heo [this message]
2026-10-16 11:52 ` [PATCH 2/2] writeback: clear old wb dirty state after inode switches Julian Sun
2026-10-16 21:55   ` Tejun Heo

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=ece89688cebc89143733bbe1556f1d5e@kernel.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=dennis@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=roman.gushchin@linux.dev \
    --cc=sunjunchao@bytedance.com \
    --cc=viro@zeniv.linux.org.uk \
    /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