Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org, Daniel Vacek <neelx@suse.com>
Subject: Re: [PATCH] btrfs: move async csum generation out of experimental features
Date: Mon, 7 Sep 2026 11:59:45 +0200	[thread overview]
Message-ID: <20260907095945.GQ9053@suse.cz> (raw)
In-Reply-To: <d79d06ab-721d-4fec-a2a3-823e9380c792@gmx.com>

On Sat, Sep 05, 2026 at 07:51:42AM +0930, Qu Wenruo wrote:
> 
> 
> 在 2026/9/5 02:30, David Sterba 写道:
> > On Thu, Sep 03, 2026 at 06:09:41PM +0930, Qu Wenruo wrote:
> >> @@ -4437,19 +4432,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
> >>   	 */
> >>   	btrfs_flush_workqueue(fs_info->delalloc_workers);
> >>   
> >> -	/*
> >> -	 * We can have ordered extents getting their last reference dropped from
> >> -	 * the fs_info->workers queue because for async writes for data bios we
> >> -	 * queue a work for that queue, at btrfs_wq_submit_bio(), that runs
> >> -	 * run_one_async_done() which calls btrfs_bio_end_io() in case the bio
> >> -	 * has an error, and that later function can do the final
> >> -	 * btrfs_put_ordered_extent() on the ordered extent attached to the bio,
> >> -	 * which adds a delayed iput for the inode. So we must flush the queue
> >> -	 * so that we don't have delayed iputs after committing the current
> >> -	 * transaction below and stopping the cleaner and transaction kthreads.
> >> -	 */
> >> -	btrfs_flush_workqueue(fs_info->workers);
> > 
> > In the final fs closing sequence there's always some possible
> > interaction between the workers, but I don't think we need an explicit
> > flush anymore. The work offloaded to the system workers will be done
> > before we get here.
> 
> In fact, Daniel's commit ("btrfs: use bio::remaining for async 
> checksumming synchronization") changed the behavior back, and we may 
> need to be more cautious now.
> 
> Previously, the csum generation workload will never call endio in its 
> context, the only work it really bothers is just to wake the completion.
> 
> But now his commit changed to use bio_endio(), which means we can again 
> run the workload from csum generation workqueue.

Yeah, this kind of problems I'm expecting but haven't done a deeper
analysis to have concrete examples like that.

> In fact, I do not believe it's the proper timing to move async csum out 
> of experimental anymore, after his commit.
> 
> I'd prefer more the next merge window at least.

We can do that, the main part, otherwise any preparatory or cleanup work
can be done now, as usual.

      reply	other threads:[~2026-09-07  9:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  8:39 [PATCH] btrfs: move async csum generation out of experimental features Qu Wenruo
2026-09-03  9:20 ` Daniel Vacek
2026-09-03 11:27   ` Qu Wenruo
2026-09-03 12:44     ` Daniel Vacek
2026-09-03 13:07       ` Daniel Vacek
2026-09-05  0:57       ` Qu Wenruo
2026-09-05 10:09         ` Daniel Vacek
2026-09-05 10:47           ` Qu Wenruo
2026-09-07  9:53             ` Daniel Vacek
2026-09-04 16:53 ` David Sterba
2026-09-04 16:55 ` David Sterba
2026-09-04 17:00 ` David Sterba
2026-09-04 22:21   ` Qu Wenruo
2026-09-07  9:59     ` David Sterba [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=20260907095945.GQ9053@suse.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=neelx@suse.com \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=wqu@suse.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